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:
parent
bba0065f0d
commit
68cad68149
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354947
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user