ClangBuiltLinux/linux

[clang-19] amdgpu: stack frame size exceeds limit in 'dml_core_mode_support'

Opened this issue · 3 comments

When compiling Linux 6.10.9 with clang-19.1.0-rc4 (commit 0c641568515a797473394694f05937e1f1913d87), I get the following warning:

  LD [M]  drivers/gpu/drm/amd/amdgpu/amdgpu.o
ld.lld: warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:6711:0: stack frame size (2064) exceeds limit (2048) in function 'dml_core_mode_support'

The warning does not appear when using clang-18.1.8.
I haven't tried with Linux 6.11.x yet.

Warnings I saw with Linux v6.11-rc5 and LLVM v19.1.0-rc3:

$ grep warning: build-log_6.11.0-rc5-1-amd64-clang19-kcfi.txt
...
45643:drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:6712:12: warning: stack frame size (2136) exceeds limit (2048) in 'dml_core_mode_support' [-Wframe-larger-than]
92900:drivers/iio/gyro/adis16260.o: warning: objtool: adis16260_write_raw+0x8a: can't find jump dest instruction at .text+0x5cd

Probably caused by some inlining change in LLVM. For the record, I generally will not fix instances of -Wframe-larger-than from drivers/gpu/drm/amd/display/dc anymore since any changes I make to this code do not make it back into the upstream source (so it just keeps occurring when a new version of the code is added for a new hardware version). If someone else wants to tackle it, they are more than welcome to do so.

Fair enough. Indeed it's not the first or second time I see this kind of warnings with amd/display.

So far, I didn't notice any inconveniences, but can you tell me whether this is a thing one should bother/worry about (i.e. security and stability)?

Feel free to close.