xref: /openbmc/linux/scripts/gcc-plugins/Kconfig (revision 595b893e)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
245332b1bSMasahiro Yamadaconfig HAVE_GCC_PLUGINS
345332b1bSMasahiro Yamada	bool
445332b1bSMasahiro Yamada	help
545332b1bSMasahiro Yamada	  An arch should select this symbol if it supports building with
645332b1bSMasahiro Yamada	  GCC plugins.
745332b1bSMasahiro Yamada
8a5b0dc5aSArnd Bergmannmenuconfig GCC_PLUGINS
9a5b0dc5aSArnd Bergmann	bool "GCC plugins"
1045332b1bSMasahiro Yamada	depends on HAVE_GCC_PLUGINS
115429ef62SWill Deacon	depends on CC_IS_GCC
121e860048SMasahiro Yamada	depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h)
139f671e58SKees Cook	default y
1445332b1bSMasahiro Yamada	help
1545332b1bSMasahiro Yamada	  GCC plugins are loadable modules that provide extra features to the
1645332b1bSMasahiro Yamada	  compiler. They are useful for runtime instrumentation and static analysis.
1745332b1bSMasahiro Yamada
182b4cbd5cSJonathan Corbet	  See Documentation/kbuild/gcc-plugins.rst for details.
1945332b1bSMasahiro Yamada
20a5b0dc5aSArnd Bergmannif GCC_PLUGINS
2145332b1bSMasahiro Yamada
2245332b1bSMasahiro Yamadaconfig GCC_PLUGIN_SANCOV
2345332b1bSMasahiro Yamada	bool
24*8bd51a2bSKees Cook	# Plugin can be removed once the kernel only supports GCC 6+
25*8bd51a2bSKees Cook	depends on !CC_HAS_SANCOV_TRACE_PC
2645332b1bSMasahiro Yamada	help
2745332b1bSMasahiro Yamada	  This plugin inserts a __sanitizer_cov_trace_pc() call at the start of
2845332b1bSMasahiro Yamada	  basic blocks. It supports all gcc versions with plugin support (from
2945332b1bSMasahiro Yamada	  gcc-4.5 on). It is based on the commit "Add fuzzing coverage support"
3045332b1bSMasahiro Yamada	  by Dmitry Vyukov <dvyukov@google.com>.
3145332b1bSMasahiro Yamada
3245332b1bSMasahiro Yamadaconfig GCC_PLUGIN_LATENT_ENTROPY
3345332b1bSMasahiro Yamada	bool "Generate some entropy during boot and runtime"
3445332b1bSMasahiro Yamada	help
3545332b1bSMasahiro Yamada	  By saying Y here the kernel will instrument some kernel code to
3645332b1bSMasahiro Yamada	  extract some entropy from both original and artificially created
3745332b1bSMasahiro Yamada	  program state.  This will help especially embedded systems where
3845332b1bSMasahiro Yamada	  there is little 'natural' source of entropy normally.  The cost
3945332b1bSMasahiro Yamada	  is some slowdown of the boot process (about 0.5%) and fork and
4045332b1bSMasahiro Yamada	  irq processing.
4145332b1bSMasahiro Yamada
4245332b1bSMasahiro Yamada	  Note that entropy extracted this way is not cryptographically
4345332b1bSMasahiro Yamada	  secure!
4445332b1bSMasahiro Yamada
4545332b1bSMasahiro Yamada	  This plugin was ported from grsecurity/PaX. More information at:
4645332b1bSMasahiro Yamada	   * https://grsecurity.net/
4745332b1bSMasahiro Yamada	   * https://pax.grsecurity.net/
4845332b1bSMasahiro Yamada
49189af465SArd Biesheuvelconfig GCC_PLUGIN_ARM_SSP_PER_TASK
50189af465SArd Biesheuvel	bool
51189af465SArd Biesheuvel	depends on GCC_PLUGINS && ARM
52189af465SArd Biesheuvel
53a5b0dc5aSArnd Bergmannendif
54