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
This commit is contained in:
Mark Johnston 2021-03-08 12:39:06 -05:00
parent 0e72eb4602
commit 435c7cfb24
7 changed files with 12 additions and 12 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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 {

View File

@ -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,

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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
/*