]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
kasan: disable kasan_mark() after a violation
authorMitchell Horne <mhorne@FreeBSD.org>
Tue, 27 Sep 2022 16:01:02 +0000 (11:01 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 27 Sep 2022 16:01:21 +0000 (11:01 -0500)
commitf2963b530e17c5eff66bc5f4860b1cd224d3d033
tree920605a0f0f7217d6aa56dbd6e13a43a686e7436
parent27d673fbbb79b1b829484ec127da59b45f623ebd
kasan: disable kasan_mark() after a violation

Specifically, when we receive a violation and we're configured to panic,
kasan_enabled gets unset before we descend into panic().  At this point,
there's no longer any reason to allow marking as kasan_shadow_check() is
disabled -- we have some inherent risk of faulting or panicking if the
system's in a bad enough state with no benefit.

Reviewed by: markj
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D36742
sys/kern/subr_asan.c