All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Nyström" <david.nystrom@est.tech>
To: Alyssa Ross <hi@alyssa.is>
Cc: "Philip Müller" <philm@manjaro.org>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Laura Nao" <laura.nao@collabora.com>,
	stable@vger.kernel.org, "Uday M Bhat" <uday.m.bhat@intel.com>
Subject: Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
Date: Mon, 15 Dec 2025 20:00:35 +0100 (CET)	[thread overview]
Message-ID: <6dd6eef7-15cb-00a3-c216-d6eaaa5cbf54@est.tech> (raw)
In-Reply-To: <yyi32aqbvgmvud6egijxurgpbe6mzax73z6l5od3nzt4lsoxzt@msp7t3hsvobw>

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]


On Sun, 26 Oct 2025, Alyssa Ross wrote:

> On Tue, Jun 24, 2025 at 09:05:31AM +0200, Philip Müller wrote:
>> On 6/5/25 10:46, Greg KH wrote:
>>> I have no context here, sorry...
>>
>> Seems with 5.10.239-rc1 it compiles again just fine ...
>
> We've been seeing this issue[1] since 5.10.244 (specifically commit
> b039655d31a1 ("genirq: Provide new interfaces for affinity hints")),
> and still in 5.10.245.
>
> Given that this has apparently come up before, and I don't see any
> likely cause looking at that diff, I suppose it's probably some build
> issue in 5.10 that can be triggered by innocent diffs, and so is liable
> to keep fixing and breaking itself until somebody figure out the root
> cause…
>
> [1]: https://github.com/NixOS/nixpkgs/pull/448034#issuecomment-3364278085
>

I have analyzed the issue, and it seems like never versions of GCC will 
agressively inline both in compile and linktime.
I'm not sure if this is fixed properly in master, I would assume its fixed 
by adding enough code into BTF exposed functions so that they not
optimized away anymore.

I can "fix" this locally via:
CONFIG_DEBUG_INFO_BTF=n

or

diff --git a/fs/Makefile b/fs/Makefile
index c660ce28f149..6fbaccbae1d9 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -6,6 +6,10 @@
  # Rewritten to use lists instead of if-statements.
  #

+# Prevent agressive link-time inlining of BTF symbols
+# Prevent GCC 15 IPA from removing filp_close symbol needed for BTF
+CFLAGS_open.o = -fno-inline -fno-ipa-sra
+

or by removing line below.

linux-stable$ git grep filp_close kernel/trace
kernel/trace/bpf_trace.c:BTF_ID(func, filp_close)

Last seems like the simplest option, but would cause regressions for BPF
programs I presume.
GCC 15+ does not seem to adhere to __noinline, at least not for this 
issue.

      reply	other threads:[~2025-12-15 19:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14  1:18 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close Philip Müller
2025-03-14  5:39 ` Greg Kroah-Hartman
2025-03-14  9:19   ` Philip Müller
2025-03-20 11:28     ` Laura Nao
2025-03-20 12:55       ` Greg KH
2025-03-28 11:06       ` Philip Müller
2025-04-01  9:17         ` Greg KH
2025-06-05  7:44           ` Philip Müller
2025-06-05  8:46             ` Greg KH
2025-06-08  6:27               ` Philip Müller
2025-06-17 14:05                 ` Greg KH
2025-06-19  8:34                   ` Philip Müller
2025-06-19  8:47                     ` Greg KH
2025-06-24  7:05               ` Philip Müller
2025-10-26 13:26                 ` Alyssa Ross
2025-12-15 19:00                   ` David Nyström [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=6dd6eef7-15cb-00a3-c216-d6eaaa5cbf54@est.tech \
    --to=david.nystrom@est.tech \
    --cc=gregkh@linuxfoundation.org \
    --cc=hi@alyssa.is \
    --cc=laura.nao@collabora.com \
    --cc=philm@manjaro.org \
    --cc=stable@vger.kernel.org \
    --cc=uday.m.bhat@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.