From: Ard Biesheuvel <ardb@kernel.org>
To: Michael Kelley <mhklinux@outlook.com>
Cc: "brgerst@gmail.com" <brgerst@gmail.com>,
"mingo@kernel.org" <mingo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Compile problems w/gcc 9.4.0 in linux-next
Date: Thu, 20 Mar 2025 20:19:45 +0100 [thread overview]
Message-ID: <CAMj1kXH-awwT99FTaBJqyEbgBoxc20h4LfbzXMP00NQHBs03+A@mail.gmail.com> (raw)
In-Reply-To: <SN6PR02MB415723FBCD79365E8D72CA5FD4D82@SN6PR02MB4157.namprd02.prod.outlook.com>
Hi Michael,
On Thu, 20 Mar 2025 at 19:29, Michael Kelley <mhklinux@outlook.com> wrote:
>
> Brian/Ingo/Ard -
>
> I'm seeing a compile problem in linux-next-20250319 with gcc 9.4.0. I've bisected
> to a group of 6 commits that you authored:
>
> a9a76b38aaf5 x86/boot: Disable stack protector for early boot code
> f58b63857ae3 x86/pvh: Use fixed_percpu_data for early boot GSBASE
> cb7927fda002 x86/relocs: Handle R_X86_64_REX_GOTPCRELX relocations
> 78c4374ef8b8 x86/module: Deal with GOT based stack cookie load on Clang < 17
> 80d47defddc0 x86/stackprotector/64: Convert to normal per-CPU variable
> 9d7de2aa8b41 x86/percpu/64: Use relative percpu offsets
>
> As of a9a76b38aaf5, everything compiles correctly.
>
> For f58b63857ae3 thru 80d47defddc0, this error occurs:
>
> arch/x86/platform/pvh/head.S: Assembler messages:
> arch/x86/platform/pvh/head.S:183: Error: operand size mismatch for `movq'
>
This is simply a bug in patch f58b63857ae3, which uses movq on
EDX/EAX. This breaks bisection (as you've noticed), annoyingly, and
I'll leave it to the tip maintainers to decide whether this warrants a
rebase (given that the fix is already queued up as well)
> As of 9d7de2aa8b41 and later, the head.S error goes away, and this
> error occurs:
>
> lib/zstd/compress/huf_compress.c:1033:1: internal compiler error: Segmentation fault
> 1033 | {
> | ^
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
>
> Interestingly, if DYNAMIC_BMI2 in lib/zstd/common/portability_macros.h
> is changed on line 61 to always be defined as 0, the compile problem in
> huf_compress.c goes away.
>
Without having looked at the crashing code, I suspect that the only
meaningful course of action here is to tweak the conditional logic
that defines DYNAMIC_BMI2 to only enable it for GCC >= 10.1 (assuming
those are unaffected) In any case, GCC 9.4 is not going to get fixed
in the field, so even if this gets fixed on the GCC side, we will have
to deal with it here.
> I'm using gcc 9.4.0 in an Ubuntu 20.04 install as it's the standard compiler
> for that version of Ubuntu. I'm guessing that getting a fix for that
> relatively old version of gcc isn't likely. I have not tested with other
> gcc versions.
next prev parent reply other threads:[~2025-03-20 19:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 18:29 Compile problems w/gcc 9.4.0 in linux-next Michael Kelley
2025-03-20 19:19 ` Ard Biesheuvel [this message]
2025-03-20 20:41 ` Michael Kelley
2025-03-20 21:58 ` Michael Kelley
2025-03-21 7:38 ` Ingo Molnar
2025-03-21 15:16 ` Michael Kelley
2025-03-21 18:06 ` Nick Terrell
2025-03-25 10:18 ` Ingo Molnar
2025-03-25 20:47 ` Nick Terrell
2025-03-25 22:05 ` Ingo Molnar
2025-03-22 7:36 ` Ingo Molnar
2025-03-23 4:58 ` Nick Terrell
2025-03-23 17:52 ` Michael Kelley
2025-03-21 7:37 ` Ingo Molnar
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=CAMj1kXH-awwT99FTaBJqyEbgBoxc20h4LfbzXMP00NQHBs03+A@mail.gmail.com \
--to=ardb@kernel.org \
--cc=brgerst@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=mingo@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 NNTP newsgroup(s).