Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+6 -6
+1 -1
scripts/gcc-plugins/Makefile
··· 28 28 29 29 plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \ 30 30 -include $(srctree)/include/linux/compiler-version.h \ 31 - -include $(objtree)/include/generated/utsrelease.h \ 31 + -DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \ 32 32 -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \ 33 33 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \ 34 34 -ggdb -Wno-narrowing -Wno-unused-variable \
+1 -1
scripts/gcc-plugins/latent_entropy_plugin.c
··· 82 82 static GTY(()) tree latent_entropy_decl; 83 83 84 84 static struct plugin_info latent_entropy_plugin_info = { 85 - .version = UTS_RELEASE, 85 + .version = PLUGIN_VERSION, 86 86 .help = "disable\tturn off latent entropy instrumentation\n", 87 87 }; 88 88
+1 -1
scripts/gcc-plugins/randomize_layout_plugin.c
··· 34 34 static int performance_mode; 35 35 36 36 static struct plugin_info randomize_layout_plugin_info = { 37 - .version = UTS_RELEASE, 37 + .version = PLUGIN_VERSION, 38 38 .help = "disable\t\t\tdo not activate plugin\n" 39 39 "performance-mode\tenable cacheline-aware layout randomization\n" 40 40 };
+1 -1
scripts/gcc-plugins/sancov_plugin.c
··· 26 26 tree sancov_fndecl; 27 27 28 28 static struct plugin_info sancov_plugin_info = { 29 - .version = UTS_RELEASE, 29 + .version = PLUGIN_VERSION, 30 30 .help = "sancov plugin\n", 31 31 }; 32 32
+1 -1
scripts/gcc-plugins/stackleak_plugin.c
··· 44 44 static GTY(()) tree track_function_decl; 45 45 46 46 static struct plugin_info stackleak_plugin_info = { 47 - .version = UTS_RELEASE, 47 + .version = PLUGIN_VERSION, 48 48 .help = "track-min-size=nn\ttrack stack for functions with a stack frame size >= nn bytes\n" 49 49 "arch=target_arch\tspecify target build arch\n" 50 50 "disable\t\tdo not activate the plugin\n"
+1 -1
scripts/gcc-plugins/structleak_plugin.c
··· 37 37 __visible int plugin_is_GPL_compatible; 38 38 39 39 static struct plugin_info structleak_plugin_info = { 40 - .version = UTS_RELEASE, 40 + .version = PLUGIN_VERSION, 41 41 .help = "disable\tdo not activate plugin\n" 42 42 "byref\tinit structs passed by reference\n" 43 43 "byref-all\tinit anything passed by reference\n"