Skip to content

Commit 090b39a

Browse files
committed
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
2 parents 6d29d7f + d37aa2e commit 090b39a

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

scripts/gcc-plugins/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
2828

2929
plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
3030
-include $(srctree)/include/linux/compiler-version.h \
31-
-include $(objtree)/include/generated/utsrelease.h \
31+
-DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \
3232
-I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
3333
-fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
3434
-ggdb -Wno-narrowing -Wno-unused-variable \

scripts/gcc-plugins/latent_entropy_plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ __visible int plugin_is_GPL_compatible;
8282
static GTY(()) tree latent_entropy_decl;
8383

8484
static struct plugin_info latent_entropy_plugin_info = {
85-
.version = UTS_RELEASE,
85+
.version = PLUGIN_VERSION,
8686
.help = "disable\tturn off latent entropy instrumentation\n",
8787
};
8888

scripts/gcc-plugins/randomize_layout_plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ __visible int plugin_is_GPL_compatible;
3434
static int performance_mode;
3535

3636
static struct plugin_info randomize_layout_plugin_info = {
37-
.version = UTS_RELEASE,
37+
.version = PLUGIN_VERSION,
3838
.help = "disable\t\t\tdo not activate plugin\n"
3939
"performance-mode\tenable cacheline-aware layout randomization\n"
4040
};

scripts/gcc-plugins/sancov_plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ __visible int plugin_is_GPL_compatible;
2626
tree sancov_fndecl;
2727

2828
static struct plugin_info sancov_plugin_info = {
29-
.version = UTS_RELEASE,
29+
.version = PLUGIN_VERSION,
3030
.help = "sancov plugin\n",
3131
};
3232

scripts/gcc-plugins/stackleak_plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static bool verbose = false;
4444
static GTY(()) tree track_function_decl;
4545

4646
static struct plugin_info stackleak_plugin_info = {
47-
.version = UTS_RELEASE,
47+
.version = PLUGIN_VERSION,
4848
.help = "track-min-size=nn\ttrack stack for functions with a stack frame size >= nn bytes\n"
4949
"arch=target_arch\tspecify target build arch\n"
5050
"disable\t\tdo not activate the plugin\n"

scripts/gcc-plugins/structleak_plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
__visible int plugin_is_GPL_compatible;
3838

3939
static struct plugin_info structleak_plugin_info = {
40-
.version = UTS_RELEASE,
40+
.version = PLUGIN_VERSION,
4141
.help = "disable\tdo not activate plugin\n"
4242
"byref\tinit structs passed by reference\n"
4343
"byref-all\tinit anything passed by reference\n"

0 commit comments

Comments
 (0)