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…
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.