From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 2/2] gcc-plugins: disable plugins when gmp.h is unavailable
Date: Wed, 13 Mar 2024 15:42:17 +0100 [thread overview]
Message-ID: <20240313154111-53729221-b8fb-4969-ac4d-ea74861f6c84@linutronix.de> (raw)
In-Reply-To: <CAK7LNAQ=aSqUUStN_M8QVqeS9R1QVM5CPq7=kzpY0z060XJFDA@mail.gmail.com>
On Wed, Mar 13, 2024 at 12:47:59PM +0900, Masahiro Yamada wrote:
> On Wed, Mar 13, 2024 at 6:53 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > On Tue, Mar 12, 2024 at 04:03:30PM +0100, Thomas Weißschuh wrote:
> > > 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@linutronix.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)
> >
> > Why does the prior depends not fail? That's where plugin detection is
> > happening.
> >
> > --
> > Kees Cook
>
> This patch set should be rejected.
>
>
> It was already discussed in the past.
> Just install a proper package, then gcc-plugin will work.
>
> https://lore.kernel.org/all/CAHk-=wjjiYjCp61gdAMpDOsUBU-A2hFFKJoVx5VAC7yV4K6WYg@mail.gmail.com/
Thanks for the pointer.
As there is already consensus I agree that the patches should not be used.
Thomas
prev parent reply other threads:[~2024-03-13 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 15:03 [PATCH 0/2] gcc-plugins: disable plugins when gmp.h is unavailable Thomas Weißschuh
2024-03-12 15:03 ` [PATCH 1/2] kbuild: add host-cc-option helper Thomas Weißschuh
2024-03-12 15:03 ` [PATCH 2/2] gcc-plugins: disable plugins when gmp.h is unavailable Thomas Weißschuh
2024-03-12 21:53 ` Kees Cook
2024-03-13 3:47 ` Masahiro Yamada
2024-03-13 14:42 ` Thomas Weißschuh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240313154111-53729221-b8fb-4969-ac4d-ea74861f6c84@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).