HomeFreeBSD

mlx5: Zero DMA memory mlx5_alloc_cmd_msg() and alloc_cmd_page()

Description

mlx5: Zero DMA memory mlx5_alloc_cmd_msg() and alloc_cmd_page()

These functions may map more memory for DMA than is actually used, since
the allocator operates on multiples of a 4KB page size. Thus,
bus_dmamap_sync() can trigger KMSAN reports when the unused portion of
a page is not zero-ed.

Reported by: KMSAN
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D43133

(cherry picked from commit 47a6fb9d5a2ebec12114a604053ffbd2929f0021)

Details

Provenance
markjAuthored on Jan 18 2024, 9:47 PM
Reviewer
kib
Differential Revision
D43133: mlx5: Zero DMA memory in mlx5_fwp_alloc()
Parents
rG14b7cf92e73a: open(2): describe *at behavior for dirfd opened without O_SEARCH
Branches
Unknown
Tags
Unknown