git: ea3fbe0707f9 - main - KASAN: Disable checking before triggering a panic

Mark Johnston markj at FreeBSD.org
Fri Jul 23 14:50:03 UTC 2021


The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=ea3fbe0707f9a02a29875966668b6f15284f335a

commit ea3fbe0707f9a02a29875966668b6f15284f335a
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-07-23 14:41:00 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-07-23 14:47:14 +0000

    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
---
 sys/kern/subr_asan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c
index 07f7b44d08d7..825d7d4228c0 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;			\


More information about the dev-commits-src-main mailing list