diff options
| author | Ard Biesheuvel <ardb@kernel.org> | 2026-10-15 13:38:58 +0200 |
|---|---|---|
| committer | Ard Biesheuvel <ardb@kernel.org> | 2026-10-15 13:52:08 +0200 |
| commit | 4c86b5f3fa78347fa9cbc9e8ec06615b2f80e397 (patch) | |
| tree | 029cf7ea7cec7b5cfe90467f854ec089d903899b /scripts/Makefile.thinlto | |
| parent | 8ea857a2bb547e388e86ca42c58a97e162e09f83 (diff) | |
| download | linux-4c86b5f3fa78347fa9cbc9e8ec06615b2f80e397.tar.gz linux-4c86b5f3fa78347fa9cbc9e8ec06615b2f80e397.zip | |
efi/libstub: arm64: Don't use the platform register x18
The UEFI specification designates x18, the platform register, as "do not
use" on AArch64, so that UEFI code is compatible both with an OS that
assigns a fixed role to x18, and with one that uses it as a temporary
register.
The arm64 EFI stub and the EFI zboot decompressor only avoid x18 if the
kernel is built with shadow call stacks, as that is the only case where
-ffixed-x18 is added to KBUILD_CFLAGS, which the stub inherits.
Otherwise, the compiler is free to use x18 as a temporary register, and
it does so.
So pass -ffixed-x18 unconditionally when building the stub for arm64,
so that the image can be run by loaders that rely on x18 being left
alone, such as a kernel that uses it for its shadow call stack.
Cc: <stable@vger.kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
