mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
mm/umm_heap: disable KASAN for user-space heap in kernel build
When CONFIG_BUILD_KERNEL is enabled, user-space and kernel-space have separate address spaces. User-space addresses passed via syscalls (e.g., open) are registered by KASAN but should not be monitored, as they are not kernel heap allocations. This causes KASAN to report false positives on user-space pointers accessed through system calls. Mark the user-space heap with nokasan=true so KASAN skips checking its address range, consistent with how rptun already handles this. Signed-off-by: leisiji <2265215145@qq.com>
This commit is contained in:
parent
7253e70659
commit
dd86c92405
1 changed files with 1 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ void umm_initialize(FAR void *heap_start, size_t heap_size)
|
|||
config.start = heap_start;
|
||||
config.size = heap_size;
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
config.nokasan = true;
|
||||
USR_HEAP = mm_initialize_pool(&config, NULL);
|
||||
#else
|
||||
config.name = "Umem";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue