# This file declares the list of source files that should be exempt from
# AddressSanitizer instrumentation. Usually, this is because a file is used by
# the AddressSanitizer runtime itself, or because the code executes before
# the runtime has been initialized.
[.*]
# Blanket ignore non-sanitized functions
fun:__nosan_*
# Try really hard to avoid panicing while debugging
src:./osfmk/kdp/*
src:./osfmk/kern/debug.c
[kernel-hwaddress|address]
# Exclude linker sets
type:struct linker_set_entry
type:linker_set_entry
type:struct startup_entry
type:startup_entry
type:struct kalloc_type_view
type:struct kernel_brk_descriptor
type:kernel_brk_descriptor
# Exclude per-cpu data structures the assembly accesses
type:vm_statistics64
type:struct vm_statistics64
type:vm_statistics64_data_t
type:struct processor
type:processor
# Exclude KASan itself
src:./san/memory/kasan.c
src:./san/memory/kasan-fakestack.c
src:./san/memory/kasan-x86_64.c
src:./san/memory/kasan-memintrinsics.c
src:./san/memory/kasan_dynamic_blacklist.c
src:./san/memory/kasan-classic.c
src:./san/memory/kasan-tbi.c
src:./san/memory/kasan-helper.c
src:./san/memory/kasan-report.c
# Exclude other sanitizers
src:./san/coverage/kcov.c
src:./san/coverage/kcov_ksancov.c
src:./san/coverage/kcov_stksz.c
# Exclude dtrace function that does weird stack manipulations
fun:fbt_perfCallback
# Exclude leak detection code that reads all memory
fun:_ZL18IOTrackingLeakScanPv
# Exclude KASAN dependencies
src:./osfmk/kern/btlog.c
# XXX: could this be relaxed since fakestack is reentrant?
src:./osfmk/kern/zalloc.c