diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -155,6 +155,8 @@ return "MallocRedZone"; case KASAN_KMEM_REDZONE: return "KmemRedZone"; + case KASAN_UMA_NEVERUSED: + return "UMANeverAllocated"; case KASAN_UMA_FREED: return "UMAUseAfterFree"; case KASAN_KSTACK_FREED: diff --git a/sys/sys/asan.h b/sys/sys/asan.h --- a/sys/sys/asan.h +++ b/sys/sys/asan.h @@ -46,6 +46,7 @@ #define KASAN_USE_AFTER_SCOPE 0xF8 /* Our redzone values. */ +#define KASAN_UMA_NEVERUSED 0xF9 #define KASAN_GENERIC_REDZONE 0xFA #define KASAN_MALLOC_REDZONE 0xFB #define KASAN_KMEM_REDZONE 0xFC diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -606,7 +606,7 @@ sz = keg->uk_ppera * PAGE_SIZE; else sz = keg->uk_pgoff; - kasan_mark(mem, 0, sz, KASAN_UMA_FREED); + kasan_mark(mem, 0, sz, KASAN_UMA_NEVERUSED); } } #else /* !KASAN */