redzone: Raise a compile error if KASAN is configured
redzone(9) does some munging of the allocation to insert redzones before and after a valid memory buffer, but KASAN does not know about this and will raise false positives if both are configured. Until this is fixed, do not allow both to be configured. Note that KASAN provides similar checking on its own but currently does not force the creation of redzones for all UMA allocations; this should be addressed as well. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
f95e683fa2
commit
4e8e26a004
@ -37,6 +37,10 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <vm/redzone.h>
|
#include <vm/redzone.h>
|
||||||
|
|
||||||
|
#ifdef KASAN
|
||||||
|
#error KASAN and DEBUG_REDZONE cannot be configured together
|
||||||
|
#endif
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm, OID_AUTO, redzone, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL,
|
static SYSCTL_NODE(_vm, OID_AUTO, redzone, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL,
|
||||||
"RedZone data");
|
"RedZone data");
|
||||||
static u_long redzone_extra_mem = 0;
|
static u_long redzone_extra_mem = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user