diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-07-23 14:41:00 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-11-01 14:07:45 +0000 |
commit | 252b6ae3e66ba6a6a03334fe62665793e6d1359c (patch) | |
tree | cdd450752afa20291325855e54df31e9e8fd9439 | |
parent | bdfb568f8dfc8f1fb22b12cd8281c47bcd388b14 (diff) | |
download | src-252b6ae3e66ba6a6a03334fe62665793e6d1359c.tar.gz src-252b6ae3e66ba6a6a03334fe62665793e6d1359c.zip |
KASAN: Disable checking before triggering a panic
KASAN hooks will not generate reports if panicstr != NULL, but then
there is a window after the initial panic() call where another report
may be raised. This can happen if a false positive occurs; to simplify
debugging of such problems, avoid recursing.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ea3fbe0707f9a02a29875966668b6f15284f335a)
-rw-r--r-- | sys/kern/subr_asan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index d3638ffb5dde..2967b443d5c8 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -174,6 +174,7 @@ kasan_code_name(uint8_t code) #define REPORT(f, ...) do { \ if (panic_on_violation) { \ + kasan_enabled = false; \ panic(f, __VA_ARGS__); \ } else { \ struct stack st; \ |