From: Nathan Chancellor <nathan@kernel.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Uros Bizjak <ubizjak@gmail.com>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
"x86@kernel.org" <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Do we still care about compilers without __seg_fs and __seg_gs support??
Date: Fri, 19 Dec 2025 17:24:24 -0700 [thread overview]
Message-ID: <20251220002424.GA3998744@ax162> (raw)
In-Reply-To: <c5432e6b-5a8d-4ef4-9cd4-c18e6a2b1e4b@zytor.com>
On Fri, Dec 19, 2025 at 03:24:21PM -0800, H. Peter Anvin wrote:
> As of Linux 6.16, we require:
>
> gcc 8.1 or higher
> clang 15.0.0 or higher
>
> If my reading of the release notes is correct, then both versions *should*
> supported __seg_fs and __seg_gs, but we have:
>
> config CC_HAS_NAMED_AS
> def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x
> c - -S -o /dev/null)
> depends on CC_IS_GCC
>
> We don't even try on clang.
>
> Being able to actually rely on the compiler for this would make a lot of
> things cleaner. For one thing, I'm trying to untangle a bunch of ugliness in
> the code sharing between realmode and proper flat mode code...
>
> Uros, you seem to have touched this code as recently as earlier this year; any
> thoughts?
>
> What about the LLVM people, any insights?
Trying to use __seg_fs or __seg_gs in certain cases crashes the X86
backend.
https://github.com/llvm/llvm-project/issues/93449
Is there anyone on AMD or Intel's LLVM teams that could look into
solving that? Nick pinged a couple of Intel's folks but it does not look
Cheers,
Nathan
next prev parent reply other threads:[~2025-12-20 0:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 23:24 Do we still care about compilers without __seg_fs and __seg_gs support?? H. Peter Anvin
2025-12-20 0:24 ` Nathan Chancellor [this message]
2025-12-20 0:43 ` H. Peter Anvin
2025-12-20 0:47 ` H. Peter Anvin
2025-12-20 7:50 ` Uros Bizjak
2025-12-20 8:47 ` H. Peter Anvin
2025-12-20 7:47 ` Uros Bizjak
2025-12-20 20:53 ` H. Peter Anvin
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=20251220002424.GA3998744@ax162 \
--to=nathan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=morbo@google.com \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=ubizjak@gmail.com \
--cc=x86@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