W-M-R opened a new pull request, #21359:
URL: https://github.com/apache/nuttx/pull/21359

   ## Summary
   
   `allsyms.tmp` and `kasan_globals.tmp` are generated arrays with no
   compile-time bounds. When built with `-fsanitize=kernel-address`, every
   access is checked against a shadow entry that does not exist for dynamically
   linked arrays, which produces false positives and, for `kasan_globals.tmp`,
   an empty array.
   
   Add `-fno-sanitize=kernel-address` to both generated objects, in the Makefile
   paths (`arch/{arm,arm64,risc-v,sim,x86}/src/Makefile`) and via
   `set_source_files_properties()` in the CMake path.
   
   ## Impact
   
   - Build-system only; `CONFIG_ALLSYMS` / `CONFIG_MM_KASAN_GLOBAL`
     configurations build again.
   - No runtime change when those options are disabled.
   
   ## Testing
   
   Host: Ubuntu 22.04, qemu-system-aarch64 8.2.
   
   Build `qemu-armv8a:sw_tags` with `CONFIG_ALLSYMS=y` and
   `CONFIG_MM_KASAN_GLOBAL=y`, then boot it and run `kasantest`.
   
   Before: the generated `allsyms.tmp` / `kasan_globals.tmp` objects are
   instrumented and access to them is reported as out-of-bounds (or the array
   comes out empty). After: the image builds, boots, and `kasantest` passes.
   
   Also built `sim:kasan` and the `arm`/`risc-v`/`x86` defconfigs with ALLSYMS
   enabled to cover the other Makefiles.


-- 
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