Skip to content

Commit 852faf8

Browse files
committed
gcc-plugins: remove SANCOV gcc plugin
With the minimum gcc version raised to 8.1, all supported compilers now understand the -fsanitize-coverage=trace-pc option, and there is no longer a need for the separate compiler plugin. Since only gcc-5 was able to use the plugin for several year now, it was already likely unused. Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 8530ea3 commit 852faf8

File tree

5 files changed

+0
-153
lines changed

5 files changed

+0
-153
lines changed

lib/Kconfig.debug

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,18 +2153,12 @@ config ARCH_HAS_KCOV
21532153
build and run with CONFIG_KCOV. This typically requires
21542154
disabling instrumentation for some early boot code.
21552155

2156-
config CC_HAS_SANCOV_TRACE_PC
2157-
def_bool $(cc-option,-fsanitize-coverage=trace-pc)
2158-
2159-
21602156
config KCOV
21612157
bool "Code coverage for fuzzing"
21622158
depends on ARCH_HAS_KCOV
2163-
depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS
21642159
depends on !ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || \
21652160
GCC_VERSION >= 120000 || CC_IS_CLANG
21662161
select DEBUG_FS
2167-
select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC
21682162
select OBJTOOL if HAVE_NOINSTR_HACK
21692163
help
21702164
KCOV exposes kernel code coverage information in a form suitable

scripts/Makefile.gcc-plugins

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
3838

3939
# Some plugins are enabled outside of this Makefile, but they still need to
4040
# be included in GCC_PLUGIN so they can get built.
41-
gcc-plugin-external-$(CONFIG_GCC_PLUGIN_SANCOV) \
42-
+= sancov_plugin.so
4341
gcc-plugin-external-$(CONFIG_GCC_PLUGIN_RANDSTRUCT) \
4442
+= randomize_layout_plugin.so
4543

scripts/Makefile.kcov

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
kcov-flags-$(CONFIG_CC_HAS_SANCOV_TRACE_PC) += -fsanitize-coverage=trace-pc
33
kcov-flags-$(CONFIG_KCOV_ENABLE_COMPARISONS) += -fsanitize-coverage=trace-cmp
4-
kcov-flags-$(CONFIG_GCC_PLUGIN_SANCOV) += -fplugin=$(objtree)/scripts/gcc-plugins/sancov_plugin.so
54

65
export CFLAGS_KCOV := $(kcov-flags-y)

scripts/gcc-plugins/Kconfig

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,6 @@ menuconfig GCC_PLUGINS
1919

2020
if GCC_PLUGINS
2121

22-
config GCC_PLUGIN_SANCOV
23-
bool
24-
# Plugin can be removed once the kernel only supports GCC 6+
25-
depends on !CC_HAS_SANCOV_TRACE_PC
26-
help
27-
This plugin inserts a __sanitizer_cov_trace_pc() call at the start of
28-
basic blocks. It supports all gcc versions with plugin support (from
29-
gcc-4.5 on). It is based on the commit "Add fuzzing coverage support"
30-
by Dmitry Vyukov <[email protected]>.
31-
3222
config GCC_PLUGIN_LATENT_ENTROPY
3323
bool "Generate some entropy during boot and runtime"
3424
help

scripts/gcc-plugins/sancov_plugin.c

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)