zephyr/arch
Andy Ross 02b23f3733 arch/posix: Add MemorySanitizer support
Wire this up the same way ASAN works.  Right now it's support only by
recent clang versions (not gcc), and only in 64 bit mode.  But it's
capable of detecting uninitialized data reads, which ASAN is not.

This support is wired into the sys_heap (and thus k_heap/k_malloc)
layers, allowing detection of heap misuse like use-after-free.  Note
that there is one false negative lurking: due to complexity, in the
case where a sys_heap_realloc() call is able to shrink memory in
place, the now-unused suffix is not marked uninitialized immediately,
making it impossible to detect use-after-free of those particular
bytes.  But the system will recover cleanly the next time the memory
gets allocated.

Also no attempt was made to integrate this handling into the newlib or
picolibc allocators, though that should hopefully be possible via
similar means.

Signed-off-by: Andy Ross <andyross@google.com>
2022-08-19 08:30:01 +02:00
..
arc arch: arc: Fix cache-related Kconfig symbols 2022-08-18 11:30:49 +00:00
arm arch: arm: Fix cache-related Kconfig symbols 2022-08-18 11:30:49 +00:00
arm64 arch: arm64: Fix cache-related Kconfig symbols 2022-08-18 11:30:49 +00:00
common gen_isr_tables.py: Move to scripts directory 2022-07-07 17:58:34 +00:00
mips arch: mips: add mising braces to single line if statements 2022-07-06 11:00:45 -04:00
nios2 arch: comply to coding guidelines MISRA C:2012 Rule 14.4 2022-07-20 09:28:38 -05:00
posix arch/posix: Add MemorySanitizer support 2022-08-19 08:30:01 +02:00
riscv arch: riscv: Align semihost_exec function at 16-byte boundary 2022-08-08 10:52:34 +02:00
sparc SPARC: reduce z_thread_entry_wrapper 2022-08-03 12:05:49 +02:00
x86 arch: x86: Fix cache-related Kconfig symbols 2022-08-18 11:30:49 +00:00
xtensa intel_adsp: meteorlake: Initialize stack flush pointer SR 2022-07-25 16:00:22 -04:00
CMakeLists.txt cmake: fix include directories to work with out-of-tree arch 2020-08-05 08:06:07 -04:00
Kconfig kconfig: change $(ARCH_DIR) to arch/ 2022-08-18 14:29:14 +02:00