Add kcsan_md_unsupported from NetBSD.

It's used to ignore virtual addresses that may have a different physical
address depending on the CPU.

Sponsored by:	DARPA, AFRL
This commit is contained in:
Andrew Turner 2019-11-21 13:22:23 +00:00
parent bba0065f0d
commit 68cad68149
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354947
3 changed files with 14 additions and 0 deletions

View File

@ -35,6 +35,12 @@
#include <machine/stack.h>
#include <machine/vmparam.h>
static inline bool
kcsan_md_unsupported(vm_offset_t addr)
{
return false;
}
static inline bool
kcsan_md_is_avail(void)
{

View File

@ -35,6 +35,12 @@
#include <machine/stack.h>
#include <machine/vmparam.h>
static inline bool
kcsan_md_unsupported(vm_offset_t addr)
{
return false;
}
static inline bool
kcsan_md_is_avail(void)
{

View File

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