Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2021 15:41:34 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 980da033a868 - stable/13 - Rename _cscan_atomic.h and _cscan_bus.h to atomic_san.h and bus_san.h
Message-ID:  <202103151541.12FFfYnI007496@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

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

commit 980da033a8686bbe40ffb01435c0803af15b4a65
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-03-08 17:39:06 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-03-15 15:39:11 +0000

    Rename _cscan_atomic.h and _cscan_bus.h to atomic_san.h and bus_san.h
    
    Other kernel sanitizers (KMSAN, KASAN) require interceptors as well, so
    put these in a more generic place as a step towards importing the other
    sanitizers.
    
    No functional change intended.
    
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D29103
    
    (cherry picked from commit 435c7cfb2418fdac48fa53e29e38ef03646b817d)
---
 sys/amd64/include/atomic.h                | 2 +-
 sys/arm64/include/atomic.h                | 2 +-
 sys/arm64/include/bus.h                   | 2 +-
 sys/kern/subr_csan.c                      | 4 ++--
 sys/sys/{_cscan_atomic.h => atomic_san.h} | 6 +++---
 sys/sys/{_cscan_bus.h => bus_san.h}       | 6 +++---
 sys/x86/include/bus.h                     | 2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index 87f7b8e8293e..61cb79645c10 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -69,7 +69,7 @@
 #endif
 
 #if defined(KCSAN) && !defined(KCSAN_RUNTIME)
-#include <sys/_cscan_atomic.h>
+#include <sys/atomic_san.h>
 #else
 #include <sys/atomic_common.h>
 
diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h
index 9c5d6224f3e2..6c63357f85b9 100644
--- a/sys/arm64/include/atomic.h
+++ b/sys/arm64/include/atomic.h
@@ -54,7 +54,7 @@
 #define	rmb()	dmb(ld)	/* Full system memory barrier load */
 
 #if defined(KCSAN) && !defined(KCSAN_RUNTIME)
-#include <sys/_cscan_atomic.h>
+#include <sys/atomic_san.h>
 #else
 
 #include <sys/atomic_common.h>
diff --git a/sys/arm64/include/bus.h b/sys/arm64/include/bus.h
index 917b2618b275..417b918f595f 100644
--- a/sys/arm64/include/bus.h
+++ b/sys/arm64/include/bus.h
@@ -92,7 +92,7 @@
 #define	BUS_SPACE_BARRIER_WRITE	0x02
 
 #if defined(KCSAN) && !defined(KCSAN_RUNTIME)
-#include <sys/_cscan_bus.h>
+#include <sys/bus_san.h>
 #else
 
 struct bus_space {
diff --git a/sys/kern/subr_csan.c b/sys/kern/subr_csan.c
index 3fa59ef2ea66..ec2fd23729b2 100644
--- a/sys/kern/subr_csan.c
+++ b/sys/kern/subr_csan.c
@@ -380,7 +380,7 @@ kcsan_copyout(const void *kaddr, void *uaddr, size_t len)
 /* -------------------------------------------------------------------------- */
 
 #include <machine/atomic.h>
-#include <sys/_cscan_atomic.h>
+#include <sys/atomic_san.h>
 
 #define	_CSAN_ATOMIC_FUNC_ADD(name, type)				\
 	void kcsan_atomic_add_##name(volatile type *ptr, type val)	\
@@ -688,7 +688,7 @@ CSAN_ATOMIC_FUNC_THREAD_FENCE(seq_cst)
 
 #include <sys/bus.h>
 #include <machine/bus.h>
-#include <sys/_cscan_bus.h>
+#include <sys/bus_san.h>
 
 int
 kcsan_bus_space_map(bus_space_tag_t tag, bus_addr_t hnd, bus_size_t size,
diff --git a/sys/sys/_cscan_atomic.h b/sys/sys/atomic_san.h
similarity index 99%
rename from sys/sys/_cscan_atomic.h
rename to sys/sys/atomic_san.h
index b458c24841bf..c2b963ae8b92 100644
--- a/sys/sys/_cscan_atomic.h
+++ b/sys/sys/atomic_san.h
@@ -32,8 +32,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS__CSAN_ATOMIC_H_
-#define	_SYS__CSAN_ATOMIC_H_
+#ifndef _SYS_ATOMIC_SAN_H_
+#define	_SYS_ATOMIC_SAN_H_
 
 #ifndef _MACHINE_ATOMIC_H_
 #error do not include this header, use machine/atomic.h
@@ -377,4 +377,4 @@ void	kcsan_atomic_thread_fence_seq_cst(void);
 
 #endif /* !KCSAN_RUNTIME */
 
-#endif /* !_SYS__CSAN_ATOMIC_H_ */
+#endif /* !_SYS_ATOMIC_SAN_H_ */
diff --git a/sys/sys/_cscan_bus.h b/sys/sys/bus_san.h
similarity index 99%
rename from sys/sys/_cscan_bus.h
rename to sys/sys/bus_san.h
index b1fd4135261e..96b2441fbdbe 100644
--- a/sys/sys/_cscan_bus.h
+++ b/sys/sys/bus_san.h
@@ -32,8 +32,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS__CSAN_BUS_H_
-#define	_SYS__CSAN_BUS_H_
+#ifndef _SYS_BUS_SAN_H_
+#define	_SYS_BUS_SAN_H_
 
 #define	KCSAN_BS_MULTI(rw, width, type)					\
 	void kcsan_bus_space_##rw##_multi_##width(bus_space_tag_t, 	\
@@ -206,4 +206,4 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t,
 
 #endif /* !KCSAN_RUNTIME */
 
-#endif /* !_SYS__CSAN_BUS_H_ */
+#endif /* !_SYS_BUS_SAN_H_ */
diff --git a/sys/x86/include/bus.h b/sys/x86/include/bus.h
index 562445b81203..da2fe237ae99 100644
--- a/sys/x86/include/bus.h
+++ b/sys/x86/include/bus.h
@@ -136,7 +136,7 @@
 #define	BUS_SPACE_BARRIER_WRITE	0x02		/* force write barrier */
 
 #if defined(KCSAN) && !defined(KCSAN_RUNTIME)
-#include <sys/_cscan_bus.h>
+#include <sys/bus_san.h>
 #else
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103151541.12FFfYnI007496>