summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Kconfig.debug11
-rw-r--r--scripts/Makefile.lib2
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index f07842e2d69f..cc02f282d05b 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -719,6 +719,17 @@ config KCOV
719 719
720 For more details, see Documentation/kcov.txt. 720 For more details, see Documentation/kcov.txt.
721 721
722config KCOV_INSTRUMENT_ALL
723 bool "Instrument all code by default"
724 depends on KCOV
725 default y if KCOV
726 help
727 If you are doing generic system call fuzzing (like e.g. syzkaller),
728 then you will want to instrument the whole kernel and you should
729 say y here. If you are doing more targeted fuzzing (like e.g.
730 filesystem fuzzing with AFL) then you will want to enable coverage
731 for more specific subsets of files, and should say n here.
732
722config DEBUG_SHIRQ 733config DEBUG_SHIRQ
723 bool "Debug shared IRQ handlers" 734 bool "Debug shared IRQ handlers"
724 depends on DEBUG_KERNEL 735 depends on DEBUG_KERNEL
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index e7df0f5db7ec..76494e15417b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -138,7 +138,7 @@ endif
138 138
139ifeq ($(CONFIG_KCOV),y) 139ifeq ($(CONFIG_KCOV),y)
140_c_flags += $(if $(patsubst n%,, \ 140_c_flags += $(if $(patsubst n%,, \
141 $(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)y), \ 141 $(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)$(CONFIG_KCOV_INSTRUMENT_ALL)), \
142 $(CFLAGS_KCOV)) 142 $(CFLAGS_KCOV))
143endif 143endif
144 144