Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947373 - sys-kernel/gentoo-sources-6.12.8: New warnings with sys-devel/llvm-19
Summary: sys-kernel/gentoo-sources-6.12.8: New warnings with sys-devel/llvm-19
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2025-01-03 09:41 UTC by Klaus Kusche
Modified: 2025-01-25 14:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel .config (.config,148.32 KB, text/plain)
2025-01-03 09:42 UTC, Klaus Kusche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2025-01-03 09:41:46 UTC
I build gentoo-sources with llvm and full lto.

After switching the llvm tools from 18 to 19.1.6,
I get the following warnings when building the kernel 
(both 6.12.7 and 6.12.8):

  LD      vmlinux.o
ld.lld: warning: <unknown>:0:0: stack frame size (2056) exceeds limit (2048) in function 'dml_core_mode_support'
vmlinux.o: warning: objtool: start_unlink_intr+0xb7: can't find switch jump table

I'm not absolutely sure and I don't have llvm 18 any longer to test,
but I'm quite confident that both warnings were not present with llvm 18.


Moreover, on every boot the syslog contains a warning
which was definitely not present with llvm 18:

kernel: WARNING: WARNING: Bad or missing .orc_unwind table.  Disabling unwinder.
Comment 1 Klaus Kusche 2025-01-03 09:42:52 UTC
Created attachment 915755 [details]
Kernel .config
Comment 2 Mike Pagano gentoo-dev 2025-01-19 17:38:07 UTC
As advised, please report this upstream to the LKML (lkml.org) and CC Maintainers

AMD DISPLAY CORE - DML
M:	Chaitanya Dhere <chaitanya.dhere@amd.com>
M:	Jun Lei <jun.lei@amd.com>
S:	Supported
F:	drivers/gpu/drm/amd/display/dc/dml/
F:	drivers/gpu/drm/amd/display/dc/dml2/
Comment 3 Klaus Kusche 2025-01-19 18:06:55 UTC
I've already reported both problems upstream.

The stack frame size warning is the smaller problem, 
because it has no consequences. 
There exists an inofficial patch for it,
I've no idea when it will be applied to mainline,
because the amd people seem to ignore the patch
and don't upstream it to amd's dc code base.

The objtool warning is independent of dc and more serious,
because it breaks the stack backtrace mechanism:
It causes the unwind error on booting.
It has been reproduced and analyzed by the llvm maintainers.
A bug report has been / will be opened against llvm, but will take some time.
Meanwhile, objtool will (hopefully) be patched
to just ignore this kind of broken table entries produced by llvm.

See 

https://lore.kernel.org/all/20250114171816.GA3416405@ax162/

https://lore.kernel.org/all/ee25c0b7e80113e950bd1d4c208b671d35774ff4.1736891751.git.jpoimboe@kernel.org/

https://github.com/ClangBuiltLinux/linux/issues/2048

https://github.com/ClangBuiltLinux/linux/issues/2064
Comment 4 Mike Pagano gentoo-dev 2025-01-24 18:28:05 UTC
Looks like a LLVM bisect resulted in a problematic commit.

https://github.com/llvm/llvm-project/pull/76669

This commit was reverted, along with a few others.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 14:03:36 UTC
(In reply to Klaus Kusche from comment #3)
> I've already reported both problems upstream.
> 

(In general, if you already have, please include those links upfront.)

> The stack frame size warning is the smaller problem, 
> because it has no consequences. 

I think this isn't quite right -- it's very possible that with Clang, you get more inlining, and the function genuinely is too big.