kernel hardening fix for v5.19-rc1

- Avoid GCC plugins needing utsrelease.h build target (Masahiro Yamada)
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAmKPnCQWHGtlZXNjb29r
 QGNocm9taXVtLm9yZwAKCRCJcvTf3G3AJkPYD/oD5OvCR37Mr5ZUwxZ28U9pz1YO
 PjAYqS5D6n+pQvdda4hQM6Ac6Ei0wfHvmZKIorp5oWlOZypMD8QmrkvQIjHKqvCO
 vtwaPpFyV69JDC6vx2IJks/Btfi6ZV0YDtGUb9HNA56qCjjtTsXf9SduH0VtGcwb
 tK4uG4BJLPkLq9f3lsYtL025GL+tp7po0OwgKkl/6xbnE+l7/V0ddMdOV961b1zQ
 hYqqCy7tsdThwkpeil1WWvAuo3w0zYa4+LF3WJvYQpua+txtcH8dvwkt/xCa15Uq
 y5u9fkd2p5NDpj+Y1nhcGiOFPBdYvoI7zNvXH1MFZcSakyPuS159tya1OMIdV2RB
 FS2oDxbltZA6cn6a22SjIchjHrgm911aNpPhx3OWuuzDZ9lLv+iwKBE+kIJPPCZx
 IfbatVColopOVXfQ/DpDlPO/7dZPZVJJQrZsnL/6PwLR1EtKMnN5cgXgdstdObnk
 FEEP3Kx9tPX0EOiK1rc3ebXvhlYZyuO47lwnxjRiDrHjh9RPrnqTX1LgRl5WHKzQ
 hZnNQ63N/Si+07Q7mBrRyYKXpzMvB1BCzgHYXpTetviVfaFW2C97nvjd5O27JrqP
 ot37OjW+uogv+1/0NaT76ZZby36Vmr2yGqvA3Zgvdrk1JMpPT8wMys+ER8tVnzzD
 CwByXrQkmrCmmFm9OQ==
 =gF9H
 -----END PGP SIGNATURE-----

Merge tag 'hardening-v5.19-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kernel hardening fix from Kees Cook:
 "This fixes an unlucky build race condition when using the GCC plugins,
  noticed by a few folks.

   - Avoid GCC plugins needing utsrelease.h build target (Masahiro Yamada)"

* tag 'hardening-v5.19-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  gcc-plugins: use KERNELVERSION for plugin version
This commit is contained in:
Linus Torvalds 2022-05-26 21:03:56 -07:00
commit 090b39af59
6 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
-include $(srctree)/include/linux/compiler-version.h \
-include $(objtree)/include/generated/utsrelease.h \
-DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \
-I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
-fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
-ggdb -Wno-narrowing -Wno-unused-variable \

View File

@ -82,7 +82,7 @@ __visible int plugin_is_GPL_compatible;
static GTY(()) tree latent_entropy_decl;
static struct plugin_info latent_entropy_plugin_info = {
.version = UTS_RELEASE,
.version = PLUGIN_VERSION,
.help = "disable\tturn off latent entropy instrumentation\n",
};

View File

@ -34,7 +34,7 @@ __visible int plugin_is_GPL_compatible;
static int performance_mode;
static struct plugin_info randomize_layout_plugin_info = {
.version = UTS_RELEASE,
.version = PLUGIN_VERSION,
.help = "disable\t\t\tdo not activate plugin\n"
"performance-mode\tenable cacheline-aware layout randomization\n"
};

View File

@ -26,7 +26,7 @@ __visible int plugin_is_GPL_compatible;
tree sancov_fndecl;
static struct plugin_info sancov_plugin_info = {
.version = UTS_RELEASE,
.version = PLUGIN_VERSION,
.help = "sancov plugin\n",
};

View File

@ -44,7 +44,7 @@ static bool verbose = false;
static GTY(()) tree track_function_decl;
static struct plugin_info stackleak_plugin_info = {
.version = UTS_RELEASE,
.version = PLUGIN_VERSION,
.help = "track-min-size=nn\ttrack stack for functions with a stack frame size >= nn bytes\n"
"arch=target_arch\tspecify target build arch\n"
"disable\t\tdo not activate the plugin\n"

View File

@ -37,7 +37,7 @@
__visible int plugin_is_GPL_compatible;
static struct plugin_info structleak_plugin_info = {
.version = UTS_RELEASE,
.version = PLUGIN_VERSION,
.help = "disable\tdo not activate plugin\n"
"byref\tinit structs passed by reference\n"
"byref-all\tinit anything passed by reference\n"