diff options
| author | Kees Cook <[email protected]> | 2025-07-26 09:35:49 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2025-07-26 21:28:35 +0000 |
| commit | 6676fd3c99b016b9102c584e8b6dfcfad4fa059e (patch) | |
| tree | a21950724be087b0cbfedd8e8cbc74c535d6ec2b /drivers/platform/x86/intel/pmt/class.h | |
| parent | init.h: Disable sanitizer coverage for __init and __head (diff) | |
| download | kernel-6676fd3c99b016b9102c584e8b6dfcfad4fa059e.tar.gz kernel-6676fd3c99b016b9102c584e8b6dfcfad4fa059e.zip | |
kstack_erase: Add -mgeneral-regs-only to silence Clang warnings
Once CONFIG_KSTACK_ERASE is enabled with Clang on i386, the build warns:
kernel/kstack_erase.c:168:2: warning: function with attribute 'no_caller_saved_registers' should only call a function with attribute 'no_caller_saved_registers' or be compiled with '-mgeneral-regs-only' [-Wexcessive-regsave]
Add -mgeneral-regs-only for the kstack_erase handler, to make Clang feel
better (it is effectively a no-op flag for the kernel). No binary
changes encountered.
Build & boot tested with Clang 21 on x86_64, and i386.
Build tested with GCC 14.2.0 on x86_64, i386, arm64, and arm.
Reported-by: Nathan Chancellor <[email protected]>
Closes: https://lore.kernel.org/all/20250726004313.GA3650901@ax162
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.h')
0 files changed, 0 insertions, 0 deletions
