gcc-plugins: Change all version strings match kernel
authorKees Cook <keescook@chromium.org>
Tue, 10 May 2022 23:25:54 +0000 (16:25 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 10 May 2022 23:54:33 +0000 (16:54 -0700)
It's not meaningful for the GCC plugins to track their versions separately
from the rest of the kernel. Switch all versions to the kernel version.

Fix mismatched indenting while we're at it.

Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
scripts/gcc-plugins/Makefile
scripts/gcc-plugins/latent_entropy_plugin.c
scripts/gcc-plugins/randomize_layout_plugin.c
scripts/gcc-plugins/sancov_plugin.c
scripts/gcc-plugins/stackleak_plugin.c
scripts/gcc-plugins/structleak_plugin.c

index 148f4639cf097c4dac93ed4d9aa85cd69baa3e15..6f0aecad5d671a015b50421a8d5688e3a265de5c 100644 (file)
@@ -28,10 +28,11 @@ GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
 
 plugin_cxxflags        = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
                  -include $(srctree)/include/linux/compiler-version.h \
-                  -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
-                  -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
-                  -ggdb -Wno-narrowing -Wno-unused-variable \
-                  -Wno-format-diag
+                 -include $(objtree)/include/generated/utsrelease.h \
+                 -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
+                 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
+                 -ggdb -Wno-narrowing -Wno-unused-variable \
+                 -Wno-format-diag
 
 plugin_ldflags = -shared
 
index 8425da41de0dab49c33c2f93e4eb7f1ccf095d79..5d415b2572a8df50e4c95e388e2c6eba248b73c8 100644 (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        = "201606141920vanilla",
+       .version        = UTS_RELEASE,
        .help           = "disable\tturn off latent entropy instrumentation\n",
 };
 
index c2ec81b685059d94716fc53e6bdac9e6371b63cf..19214e573137e659a1200dc6cf286540dc433415 100644 (file)
@@ -34,7 +34,7 @@ __visible int plugin_is_GPL_compatible;
 static int performance_mode;
 
 static struct plugin_info randomize_layout_plugin_info = {
-       .version        = "201402201816vanilla",
+       .version        = UTS_RELEASE,
        .help           = "disable\t\t\tdo not activate plugin\n"
                          "performance-mode\tenable cacheline-aware layout randomization\n"
 };
index 23bd023a283bd5fcc24e442316ae173925157700..f3d629555b8407741d96ca0d682eaa40de712bd3 100644 (file)
@@ -26,7 +26,7 @@ __visible int plugin_is_GPL_compatible;
 tree sancov_fndecl;
 
 static struct plugin_info sancov_plugin_info = {
-       .version        = "20160402",
+       .version        = UTS_RELEASE,
        .help           = "sancov plugin\n",
 };
 
index 42f0252ee2a4edf3d3e0879ae8920717df84302d..de817d54b8af10ed8bf9263d209209f8422dd766 100644 (file)
@@ -44,7 +44,7 @@ static bool verbose = false;
 static GTY(()) tree track_function_decl;
 
 static struct plugin_info stackleak_plugin_info = {
-       .version = "201707101337",
+       .version = UTS_RELEASE,
        .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"
index 74e319288389d3ca53fd87cc62d418fe589458c1..86b608a24ec04a9463249f832698db535035ff01 100644 (file)
@@ -37,7 +37,7 @@
 __visible int plugin_is_GPL_compatible;
 
 static struct plugin_info structleak_plugin_info = {
-       .version        = "20190125vanilla",
+       .version        = UTS_RELEASE,
        .help           = "disable\tdo not activate plugin\n"
                          "byref\tinit structs passed by reference\n"
                          "byref-all\tinit anything passed by reference\n"