aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-03-08 17:39:06 +0000
committerMark Johnston <markj@FreeBSD.org>2021-03-08 17:39:06 +0000
commit435c7cfb2418fdac48fa53e29e38ef03646b817d (patch)
treed96cb528e86e3de3bbfeceee8d27e9ad06819136
parent0e72eb460228e4b9cb790beb7113d0a5c88db503 (diff)
downloadsrc-435c7cfb2418fdac48fa53e29e38ef03646b817d.tar.gz
src-435c7cfb2418fdac48fa53e29e38ef03646b817d.zip
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. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29103
-rw-r--r--sys/amd64/include/atomic.h2
-rw-r--r--sys/arm64/include/atomic.h2
-rw-r--r--sys/arm64/include/bus.h2
-rw-r--r--sys/kern/subr_csan.c4
-rw-r--r--sys/sys/atomic_san.h (renamed from sys/sys/_cscan_atomic.h)6
-rw-r--r--sys/sys/bus_san.h (renamed from sys/sys/_cscan_bus.h)6
-rw-r--r--sys/x86/include/bus.h2
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
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
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
/*