Makefile: support flag -fsanitizer-coverage=trace-cmp
Subsystems (2)
[email protected]
maintainerPATCH 78/94 Makefile: support flag -fsanitizer-coverage=trace-cmp
From: Victor Chibotaru <[email protected]>
Subject: Makefile: support flag -fsanitizer-coverage=trace-cmp
The flag enables Clang instrumentation of comparison operations (currently not supported by GCC). This instrumentation is needed by the new KCOV device to collect comparison operands.
Signed-off-by Victor Chibotaru <[email protected]>
Signed-off-by Alexander Potapenko <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc Andrey Konovalov <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Alexander Popov <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Kees Cook <[email protected]>
Cc Vegard Nossum <[email protected]>
Cc Quentin Casasnovas <[email protected]>
Cc <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
Makefile | 3 +-- lib/Kconfig.debug | 10 ++++++++++ scripts/Makefile.kcov | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-)
lib/Kconfig.debug renamed from lib/Kconfig.debug~makefile-support-flag-fsanitizer-coverage=trace-cmp +10 -0
@@ -756,6 +756,16 @@ config KCOV For more details, see Documentation/dev-tools/kcov.rst. +config KCOV_ENABLE_COMPARISONS + bool "Enable comparison operands collection by KCOV" + depends on KCOV + default n + help + KCOV also exposes operands of every comparison in the instrumented + code along with operand sizes and PCs of the comparison instructions. + These operands can be used by fuzzing engines to improve the quality + of fuzzing coverage. + config KCOV_INSTRUMENT_ALL bool "Instrument all code by default" depends on KCOV
Makefile renamed from Makefile~makefile-support-flag-fsanitizer-coverage=trace-cmp +0 -1
@@ -375,8 +375,6 @@ CFLAGS_KERNEL = AFLAGS_KERNEL = LDFLAGS_vmlinux = CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,) -CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)