huojianchaoyy opened a new pull request, #22278:
URL: https://github.com/apache/nuttx/pull/22278

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   KASAN changes from Xiaomi Vela, split out of #22206 as asked in its review.
   
   - **kasan: fix link error**: an empty 
`__sanitizer_annotate_double_ended_contiguous_container()`, which libc++ 
(`<deque>`) calls when built with the sanitizer.
   - **kasan_report: fix spacing**: the shadow memory dump fits in 80 columns.
   - **mm/kasan: expose compiler-rt __asan_(un)poison_memory_region**: 
`__asan_poison_memory_region()` and `__asan_unpoison_memory_region()` on top of 
`kasan_poison()` / `kasan_unpoison()`, and a new 
`<sanitizer/asan_interface.h>`, so code written for user-space ASan links on a 
KASAN target.
   - **mm/kasan: default enable DISABLE_READS_CHECK**: KASAN instruments writes 
only by default.
   
   ## Impact
   
   - `CONFIG_MM_KASAN_DISABLE_READS_CHECK` defaults to y: KASAN checks writes 
only unless it is turned off.
   - New API: `__asan_poison_memory_region()` / 
`__asan_unpoison_memory_region()` and `<sanitizer/asan_interface.h>`.
   
   ## Testing
   
   Host: Ubuntu 22.04 x86_64, GCC 13.4.0 (sim, aarch64-none-elf), CMake 3.23 + 
Ninja 1.10. Base: master 25b649e1c08.
   
   `./tools/checkpatch.sh -c -u -m -g HEAD~4..HEAD` passes.
   
   `sim:ostest` (KASAN and UBSAN): a 320 s run completes one ostest pass with 
no KASAN/UBSAN report; apart from the delays printed by hrtimer_test, the 
output is the same as master's. `CONFIG_MM_KASAN_DISABLE_READS_CHECK=y` in that 
build.
   
   `qemu-armv8a:sw_tags` builds. In both builds `hook.c.o` defines 
`__asan_poison_memory_region`, `__asan_unpoison_memory_region` and 
`__sanitizer_annotate_double_ended_contiguous_container`.
   
   Not tested: linking libc++ `<deque>` with KASAN, real hardware.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to