lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240312-gcc-plugins-gmp-v1-2-c5e082437b9e@linutronix.de>
Date: Tue, 12 Mar 2024 16:03:30 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Kees Cook <keescook@...omium.org>, 
 Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-kbuild@...r.kernel.org, 
 Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 2/2] gcc-plugins: disable plugins when gmp.h is unavailable

The header gmp.h is meant to be picked up from the host system.

When it is unavailable the plugin build fails:

In file included from ../crosstools/gcc-13.2.0-nolibc/i386-linux/bin/../lib/gcc/i386-linux/13.2.0/plugin/include/gcc-plugin.h:28,
                 from ../scripts/gcc-plugins/gcc-common.h:7,
                 from ../scripts/gcc-plugins/stackleak_plugin.c:30:
../crosstools/gcc-13.2.0-nolibc/i386-linux/bin/../lib/gcc/i386-linux/13.2.0/plugin/include/system.h:703:10: fatal error: gmp.h: No such file or directory
  703 | #include <gmp.h>
      |          ^~~~~~~

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
 scripts/gcc-plugins/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig
index e383cda05367..a664fb5cdde5 100644
--- a/scripts/gcc-plugins/Kconfig
+++ b/scripts/gcc-plugins/Kconfig
@@ -10,6 +10,7 @@ menuconfig GCC_PLUGINS
 	depends on HAVE_GCC_PLUGINS
 	depends on CC_IS_GCC
 	depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h)
+	depends on $(host-cc-option,-include gmp.h)
 	default y
 	help
 	  GCC plugins are loadable modules that provide extra features to the

-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ