From: "Arnd Bergmann" <arnd@arndb.de>
To: "Steven Rostedt" <rostedt@goodmis.org>,
"Arnd Bergmann" <arnd@kernel.org>
Cc: "Kees Cook" <kees@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Alexei Starovoitov" <ast@kernel.org>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] seq_buf: avoid clang section mismatch from seq_buf_terminate optimization
Date: Tue, 01 Dec 2026 22:53:11 +0100 [thread overview]
Message-ID: <23f85d0b-5d9e-4728-a969-5c083a1b33f2@app.fastmail.com> (raw)
In-Reply-To: <20261201101314.233335f6@gandalf.local.home>
On Tue, Dec 1, 2026, at 16:13, Steven Rostedt wrote:
> On Tue, 1 Dec 2026 10:06:16 +0100 Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> I'm unsure whether this should be considered a bug in clang or the
>> kernel, or what the best workaround is. The two options I considered
>> are:
>
> It's definitely a bug in clang. If it created a specialized version of a
> function and that version is now causing section mismatches, that's a bug
> in the compiler. The kernel did nothing wrong.
Not sure I understand, do you mean clang should skip the FunctionSpecialization
in interprocedural constant propagation altogether when building the kernel,
or do you think we should teach clang about the kernel's concept of what
functions are allowed to reference .initdata?
Is the clang behavior fundamentally different from gcc here? It seems to
me that gcc just didn't hit this issue because unlike clang it does
inline across sections.
Arnd
next prev parent reply other threads:[~2026-12-01 21:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 9:06 Arnd Bergmann
2026-12-01 15:13 ` Steven Rostedt
2026-12-01 21:53 ` Arnd Bergmann [this message]
2026-12-01 22:05 ` Nick Desaulniers
2026-12-01 22:17 ` Steven Rostedt
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=23f85d0b-5d9e-4728-a969-5c083a1b33f2@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@kernel.org \
--cc=ast@kernel.org \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®