HomeFreeBSD

Generalize bus_space(9) and atomic(9) sanitizer interceptors

Description

Generalize bus_space(9) and atomic(9) sanitizer interceptors

Make it easy to define interceptors for new sanitizer runtimes, rather
than assuming KCSAN. Lay a bit of groundwork for KASAN and KMSAN.

When a sanitizer is compiled in, atomic(9) and bus_space(9) definitions
in atomic_san.h are used by default instead of the inline
implementations in the platform's atomic.h. These definitions are
implemented in the sanitizer runtime, which includes
machine/{atomic,bus}.h with SAN_RUNTIME defined to pull in the actual
implementations.

No functional change intended.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 3ead60236fd25ce64fece7ae4a453318ca18c119)

Details

Provenance
markjAuthored on Mar 23 2021, 1:44 AM
Parents
rG252b6ae3e66b: KASAN: Disable checking before triggering a panic
Branches
Unknown
Tags
Unknown