From d8da59ddf89767fdd80f4a7a87549ec3509d9426 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 12 Jan 2022 16:03:41 +0000 Subject: [PATCH] Fix the sanitizer header checks on arm64 We need to not include the MI _san.h files when builing some parts of the kernel. Fix these checks in the arm64 header files. Sponsored by: The FreeBSD Foundation --- sys/arm64/include/atomic.h | 2 +- sys/arm64/include/bus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h index 415322f2a01..0c750f00379 100644 --- a/sys/arm64/include/atomic.h +++ b/sys/arm64/include/atomic.h @@ -53,7 +53,7 @@ #define wmb() dmb(st) /* Full system memory barrier store */ #define rmb() dmb(ld) /* Full system memory barrier load */ -#if defined(KCSAN) && !defined(KCSAN_RUNTIME) +#if defined(SAN_NEEDS_INTERCEPTORS) && !defined(SAN_RUNTIME) #include #else diff --git a/sys/arm64/include/bus.h b/sys/arm64/include/bus.h index a87577b00f0..b73106a2fe7 100644 --- a/sys/arm64/include/bus.h +++ b/sys/arm64/include/bus.h @@ -92,7 +92,7 @@ #define BUS_SPACE_BARRIER_READ 0x01 #define BUS_SPACE_BARRIER_WRITE 0x02 -#ifdef SAN_NEEDS_INTERCEPTORS +#if defined(SAN_NEEDS_INTERCEPTORS) && !defined(SAN_RUNTIME) #include #else