git: d8da59ddf897 - main - Fix the sanitizer header checks on arm64

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Wed, 23 Feb 2022 14:55:56 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=d8da59ddf89767fdd80f4a7a87549ec3509d9426

commit d8da59ddf89767fdd80f4a7a87549ec3509d9426
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-01-12 16:03:41 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-02-23 14:50:56 +0000

    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 415322f2a010..0c750f00379c 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 <sys/atomic_san.h>
 #else
 
diff --git a/sys/arm64/include/bus.h b/sys/arm64/include/bus.h
index a87577b00f0c..b73106a2fe70 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 <sys/bus_san.h>
 #else