HomeFreeBSD

uma: Add KMSAN hooks

Description

uma: Add KMSAN hooks

For now, just hook the allocation path: upon allocation, items are
marked as initialized (absent M_ZERO). Some zones are exempted from
this when it would otherwise raise false positives.

Use kmsan_orig() to update the origin map for UMA and malloc(9)
allocations. This allows KMSAN to print the return address when an
uninitialized UMA item is implicated in a report. For example:

panic: MSan: Uninitialized UMA memory from m_getm2+0x7fe

Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on Aug 10 2021, 9:15 PM
Parents
rG693c9516fa60: busdma: Add KMSAN integration
Branches
Unknown
Tags
Unknown