mm: kasan supports checking 0 address access

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2024-06-06 17:06:36 +08:00 committed by Xiang Xiao
parent ae7a3d7071
commit 496e44db7f

View File

@ -173,6 +173,11 @@ static inline void kasan_check_report(FAR const void *addr, size_t size,
return;
}
if (addr == NULL)
{
kasan_report(addr, size, is_write, return_address);
}
if (kasan_is_poisoned(addr, size))
{
kasan_report(addr, size, is_write, return_address);