You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/09 14:05:22 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7066: kasan: use init value to avoid kasan used before bss clear

xiaoxiang781216 commented on code in PR #7066:
URL: https://github.com/apache/incubator-nuttx/pull/7066#discussion_r967110834


##########
mm/kasan/kasan.c:
##########
@@ -79,6 +82,11 @@ static FAR uintptr_t *kasan_mem_to_shadow(FAR const void *ptr, size_t size,
   FAR struct kasan_region_s *region;
   uintptr_t addr = (uintptr_t)ptr;
 
+  if (g_region_init != KASAN_INIT_VALUE)

Review Comment:
   The code instrumented by compiler's KASAN may run before the startup initialize .bss or .data section. Using the bigger number increase the possiblity to catch the premature access before KASAN subsystem finish the initialization.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org