aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/include/csan.h6
-rw-r--r--sys/arm64/include/csan.h6
-rw-r--r--sys/kern/subr_csan.c2
3 files changed, 14 insertions, 0 deletions
diff --git a/sys/amd64/include/csan.h b/sys/amd64/include/csan.h
index 43c37dd1a541..c886daa12f69 100644
--- a/sys/amd64/include/csan.h
+++ b/sys/amd64/include/csan.h
@@ -36,6 +36,12 @@
#include <machine/vmparam.h>
static inline bool
+kcsan_md_unsupported(vm_offset_t addr)
+{
+ return false;
+}
+
+static inline bool
kcsan_md_is_avail(void)
{
return true;
diff --git a/sys/arm64/include/csan.h b/sys/arm64/include/csan.h
index ddcd5972d06f..bace3866eb66 100644
--- a/sys/arm64/include/csan.h
+++ b/sys/arm64/include/csan.h
@@ -36,6 +36,12 @@
#include <machine/vmparam.h>
static inline bool
+kcsan_md_unsupported(vm_offset_t addr)
+{
+ return false;
+}
+
+static inline bool
kcsan_md_is_avail(void)
{
return true;
diff --git a/sys/kern/subr_csan.c b/sys/kern/subr_csan.c
index b53bf4d74f01..e01dfb1c6293 100644
--- a/sys/kern/subr_csan.c
+++ b/sys/kern/subr_csan.c
@@ -151,6 +151,8 @@ kcsan_access(uintptr_t addr, size_t size, bool write, bool atomic, uintptr_t pc)
if (__predict_false(!kcsan_enabled))
return;
+ if (__predict_false(kcsan_md_unsupported((vm_offset_t)addr)))
+ return;
new.addr = addr;
new.size = size;