mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Jeff Johnson <quic_jjohnson@quicinc.com>, arnd@arndb.de
Cc: linux-hardening@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: mips gcc plugin issues
Date: Wed, 19 Jun 2024 13:50:28 -0700	[thread overview]
Message-ID: <202406191343.D361BC137@keescook> (raw)
In-Reply-To: <563b8f82-9865-40ae-85d3-055b3bcda7d6@quicinc.com>

On Tue, Jun 18, 2024 at 04:41:01PM -0700, Jeff Johnson wrote:
> I'm trying to do an allmodconfig build for ARCH=mips using:
> https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-mips-linux.tar.gz
> 
> This build dies quickly with:
>   CC      scripts/mod/empty.o
> cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so: ./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: _ZNK6frange6acceptERK14vrange_visitor
> cc1: error: cannot load plugin ./scripts/gcc-plugins/latent_entropy_plugin.so: ./scripts/gcc-plugins/latent_entropy_plugin.so: undefined symbol: _ZNK6frange6acceptERK14vrange_visitor
>   CC      scripts/mod/devicetable-offsets.s
> make[2]: *** [scripts/Makefile.build:244: scripts/mod/empty.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so: ./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: _ZNK6frange6acceptERK14vrange_visitor
> cc1: error: cannot load plugin ./scripts/gcc-plugins/latent_entropy_plugin.so: ./scripts/gcc-plugins/latent_entropy_plugin.so: undefined symbol: _ZNK6frange6acceptERK14vrange_visitor
>   HDRINST usr/include/linux/usb/tmc.h
> make[2]: *** [scripts/Makefile.build:117: scripts/mod/devicetable-offsets.s] Error 1
> 
> I see the following in my .config:
> CONFIG_HAVE_GCC_PLUGINS=y
> CONFIG_GCC_PLUGINS=y
> CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y
> CONFIG_GCC_PLUGIN_RANDSTRUCT=y
> 
> So I'll turn those off, but just want to flag that this issue exists.
> Seems either the plugins should work or the allmodconfig should turn them off.

Well, the plugins work with all the other compiler versions all the
various CI systems use. :) For example, I don't see this with distro
cross compilers:

$ mipsel-linux-gnu-gcc --version
mipsel-linux-gnu-gcc (Ubuntu 12.3.0-1ubuntu1) 12.3.0

I suspect this is a problem with the kernel.org crosstool builds? I'm
CCing Arnd, who might know more about this.

-Kees

-- 
Kees Cook

  reply	other threads:[~2024-06-19 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 23:41 Jeff Johnson
2024-06-19 20:50 ` Kees Cook [this message]
2024-06-19 21:12   ` Arnd Bergmann
2024-06-19 21:17     ` Kees Cook
2024-06-20  5:10       ` Arnd Bergmann

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=202406191343.D361BC137@keescook \
    --to=kees@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    /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

all inboxes | Powered by JetHome®