You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x86/sme: Move early SME kernel encryption handling into .head.text
JIRA: https://issues.redhat.com/browse/RHEL-39439
Conflicts: Missing cd0d9d9 (x86/boot: Move mem_encrypt= parsing
to the decompressor) that moves the parsing logic into the
decompressor. There are more common x86 boot code changes that should
all go together. Moving SME and SEV handling into .head.text are
included together in this series only.
commit 48204ab
Author: Ard Biesheuvel <ardb@kernel.org>
Date: Tue Feb 27 16:19:15 2024 +0100
x86/sme: Move early SME kernel encryption handling into .head.text
The .head.text section is the initial primary entrypoint of the core
kernel, and is entered with the CPU executing from a 1:1 mapping of
memory. Such code must never access global variables using absolute
references, as these are based on the kernel virtual mapping which is
not active yet at this point.
Given that the SME startup code is also called from this early execution
context, move it into .head.text as well. This will allow more thorough
build time checks in the future to ensure that early startup code only
uses RIP-relative references to global variables.
Also replace some occurrences of __pa_symbol() [which relies on the
compiler generating an absolute reference, which is not guaranteed] and
an open coded RIP-relative access with RIP_REL_REF().
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20240227151907.387873-18-ardb+git@google.com
Signed-off-by: Bandan Das <bsd@redhat.com>
0 commit comments