File tree Expand file tree Collapse file tree
drivers/firmware/efi/libstub Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \
3131 -D__DISABLE_EXPORTS
3232
3333GCOV_PROFILE := n
34+ # Sanitizer runtimes are unavailable and cannot be linked here.
3435KASAN_SANITIZE := n
36+ KCSAN_SANITIZE := n
3537UBSAN_SANITIZE := n
3638OBJECT_FILES_NON_STANDARD := y
3739
Original file line number Diff line number Diff line change @@ -23,13 +23,17 @@ endif
2323# Prevents flicker of uninteresting __do_softirq()/__local_bh_disable_ip()
2424# in coverage traces.
2525KCOV_INSTRUMENT_softirq.o := n
26+ # Avoid KCSAN instrumentation in softirq ("No shared variables, all the data
27+ # are CPU local" => assume no data races), to reduce overhead in interrupts.
28+ KCSAN_SANITIZE_softirq.o = n
2629# These are called from save_stack_trace() on slub debug path,
2730# and produce insane amounts of uninteresting coverage.
2831KCOV_INSTRUMENT_module.o := n
2932KCOV_INSTRUMENT_extable.o := n
3033# Don't self-instrument.
3134KCOV_INSTRUMENT_kcov.o := n
3235KASAN_SANITIZE_kcov.o := n
36+ KCSAN_SANITIZE_kcov.o := n
3337CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
3438
3539# cond_syscall is currently not LTO compatible
@@ -118,6 +122,7 @@ obj-$(CONFIG_RSEQ) += rseq.o
118122
119123obj-$(CONFIG_GCC_PLUGIN_STACKLEAK) += stackleak.o
120124KASAN_SANITIZE_stackleak.o := n
125+ KCSAN_SANITIZE_stackleak.o := n
121126KCOV_INSTRUMENT_stackleak.o := n
122127
123128$(obj ) /configs.o : $(obj ) /config_data.gz
Original file line number Diff line number Diff line change 77# that is not a function of syscall inputs. E.g. involuntary context switches.
88KCOV_INSTRUMENT := n
99
10+ # There are numerous races here, however, most of them due to plain accesses.
11+ # This would make it even harder for syzbot to find reproducers, because these
12+ # bugs trigger without specific input. Disable by default, but should re-enable
13+ # eventually.
14+ KCSAN_SANITIZE := n
15+
1016ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER ) ,y)
1117# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
1218# needed for x86 only. Why this used to be enabled for all architectures is beyond
Original file line number Diff line number Diff line change @@ -7,6 +7,14 @@ KASAN_SANITIZE_slab_common.o := n
77KASAN_SANITIZE_slab.o := n
88KASAN_SANITIZE_slub.o := n
99
10+ # These produce frequent data race reports: most of them are due to races on
11+ # the same word but accesses to different bits of that word. Re-enable KCSAN
12+ # for these when we have more consensus on what to do about them.
13+ KCSAN_SANITIZE_slab_common.o := n
14+ KCSAN_SANITIZE_slab.o := n
15+ KCSAN_SANITIZE_slub.o := n
16+ KCSAN_SANITIZE_page_alloc.o := n
17+
1018# These files are disabled because they produce non-interesting and/or
1119# flaky coverage that is not a function of syscall inputs. E.g. slab is out of
1220# free pages, or a task is migrated between nodes.
You can’t perform that action at this time.
0 commit comments