lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 15 Sep 2021 17:23:47 +0800
From:   Dan Li <>
        Dan Li <>
Subject: [PATCH] [RFC] Add additional include path for gcc plugins

When kernel enables gcc plugin, some header files are missing in some
tool chains (as in the following example)

These header files can be found in other toolchains, and sometimes
the md5hash of these files are same(in most versions).

Should we add a parameter to plugin to allow users to import their own
header file directories?

  HOSTCXX scripts/gcc-plugins/
In file included from scripts/gcc-plugins/gcc-common.h:103:0,
                 from scripts/gcc-plugins/stackleak_plugin.c:30:
 fatal error: mpc.h: No such file or directory
 #include <mpc.h>

Signed-off-by: Dan Li <>
 Makefile                     | 3 +++
 scripts/gcc-plugins/Makefile | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 09bb314..e6134f3 100644
--- a/Makefile
+++ b/Makefile
@@ -1036,6 +1036,9 @@ include-$(CONFIG_UBSAN)		+= scripts/Makefile.ubsan
 include-$(CONFIG_KCOV)		+= scripts/Makefile.kcov
 include-$(CONFIG_GCC_PLUGINS)	+= scripts/Makefile.gcc-plugins
 include $(addprefix $(srctree)/, $(include-y))
 # scripts/Makefile.gcc-plugins is intentionally included last.
diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile
index 1952d3b..0b3e27a 100644
--- a/scripts/gcc-plugins/Makefile
+++ b/scripts/gcc-plugins/Makefile
@@ -23,7 +23,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 \
-		   -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
+		   -I $(GCC_PLUGINS_DIR)/include -I $(obj) $(GCC_PLUGINS_EXT_CFLAGS) -std=gnu++11 \
 		   -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
 		   -ggdb -Wno-narrowing -Wno-unused-variable \

Powered by blists - more mailing lists