xref: /xnu-11417.140.69/san/memory/kasan-denylist (revision 43a90889846e00bfb5cf1d255cdc0a701a1e05a4)
1#!special-case-list-v1
2# rdar://139815990
3# This file declares the list of source files that should be exempt from
4# AddressSanitizer instrumentation. Usually, this is because a file is used by
5# the AddressSanitizer runtime itself, or because the code executes before
6# the runtime has been initialized.
7
8[.*]
9
10# Blanket ignore non-sanitized functions
11fun:__nosan_*
12
13# Try really hard to avoid panicing while debugging
14src:./osfmk/kdp/*
15src:./osfmk/kern/debug.c
16
17[kernel-hwaddress|address]
18
19# Exclude linker sets
20type:struct linker_set_entry
21type:linker_set_entry
22type:struct startup_entry
23type:startup_entry
24type:struct kalloc_type_view
25type:struct kernel_brk_descriptor
26type:kernel_brk_descriptor
27
28# Exclude per-cpu data structures the assembly accesses
29type:vm_statistics64
30type:struct vm_statistics64
31type:vm_statistics64_data_t
32type:struct processor
33type:processor
34
35# Exclude KASan itself
36src:./san/memory/kasan.c
37src:./san/memory/kasan-fakestack.c
38src:./san/memory/kasan-x86_64.c
39src:./san/memory/kasan-memintrinsics.c
40src:./san/memory/kasan_dynamic_denylist.c
41src:./san/memory/kasan-classic.c
42src:./san/memory/kasan-tbi.c
43src:./san/memory/kasan-helper.c
44src:./san/memory/kasan-report.c
45
46# Exclude other sanitizers
47src:./san/coverage/kcov.c
48src:./san/coverage/kcov_ksancov.c
49src:./san/coverage/kcov_stksz.c
50
51# Exclude dtrace function that does weird stack manipulations
52fun:fbt_perfCallback
53
54# Exclude leak detection code that reads all memory
55fun:_ZL18IOTrackingLeakScanPv
56
57# Exclude static_if dependencies
58src:./osfmk/*/static_if.c
59src:./osfmk/kern/static_if_common.c
60# Exclude KASAN dependencies
61src:./osfmk/kern/btlog.c
62# XXX: could this be relaxed since fakestack is reentrant?
63src:./osfmk/kern/zalloc.c
64