diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index eb885942eb0f..d543c65ce0eb 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -736,12 +736,15 @@ config ARCH_HAS_KCOV | |||
| 736 | only for x86_64. KCOV requires testing on other archs, and most likely | 736 | only for x86_64. KCOV requires testing on other archs, and most likely |
| 737 | disabling of instrumentation for some early boot code. | 737 | disabling of instrumentation for some early boot code. |
| 738 | 738 | ||
| 739 | config CC_HAS_SANCOV_TRACE_PC | ||
| 740 | def_bool $(cc-option,-fsanitize-coverage=trace-pc) | ||
| 741 | |||
| 739 | config KCOV | 742 | config KCOV |
| 740 | bool "Code coverage for fuzzing" | 743 | bool "Code coverage for fuzzing" |
| 741 | depends on ARCH_HAS_KCOV | 744 | depends on ARCH_HAS_KCOV |
| 745 | depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS | ||
| 742 | select DEBUG_FS | 746 | select DEBUG_FS |
| 743 | select GCC_PLUGINS if !COMPILE_TEST | 747 | select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC |
| 744 | select GCC_PLUGIN_SANCOV if !COMPILE_TEST | ||
| 745 | help | 748 | help |
| 746 | KCOV exposes kernel code coverage information in a form suitable | 749 | KCOV exposes kernel code coverage information in a form suitable |
| 747 | for coverage-guided fuzzing (randomized testing). | 750 | for coverage-guided fuzzing (randomized testing). |
| @@ -755,7 +758,7 @@ config KCOV | |||
| 755 | config KCOV_ENABLE_COMPARISONS | 758 | config KCOV_ENABLE_COMPARISONS |
| 756 | bool "Enable comparison operands collection by KCOV" | 759 | bool "Enable comparison operands collection by KCOV" |
| 757 | depends on KCOV | 760 | depends on KCOV |
| 758 | default n | 761 | depends on $(cc-option,-fsanitize-coverage=trace-cmp) |
| 759 | help | 762 | help |
| 760 | KCOV also exposes operands of every comparison in the instrumented | 763 | KCOV also exposes operands of every comparison in the instrumented |
| 761 | code along with operand sizes and PCs of the comparison instructions. | 764 | code along with operand sizes and PCs of the comparison instructions. |
| @@ -765,7 +768,7 @@ config KCOV_ENABLE_COMPARISONS | |||
| 765 | config KCOV_INSTRUMENT_ALL | 768 | config KCOV_INSTRUMENT_ALL |
| 766 | bool "Instrument all code by default" | 769 | bool "Instrument all code by default" |
| 767 | depends on KCOV | 770 | depends on KCOV |
| 768 | default y if KCOV | 771 | default y |
| 769 | help | 772 | help |
| 770 | If you are doing generic system call fuzzing (like e.g. syzkaller), | 773 | If you are doing generic system call fuzzing (like e.g. syzkaller), |
| 771 | then you will want to instrument the whole kernel and you should | 774 | then you will want to instrument the whole kernel and you should |
