summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2024-03-22 16:41:07 +0100
committerIngo Molnar <mingo@kernel.org>2024-03-24 05:00:36 +0100
commit9843231c97267d72be38a0409f5097987bc2cfa4 (patch)
tree622dec3c74458613cad8ab43d8e73736075a8657 /arch/arm/lib
parentx86/boot/64: Apply encryption mask to 5-level pagetable update (diff)
downloadlinux-9843231c97267d72be38a0409f5097987bc2cfa4.tar.xz
linux-9843231c97267d72be38a0409f5097987bc2cfa4.zip
x86/boot/64: Move 5-level paging global variable assignments back
Commit 63bed9660420 ("x86/startup_64: Defer assignment of 5-level paging global variables") moved assignment of 5-level global variables to later in the boot in order to avoid having to use RIP relative addressing in order to set them. However, when running with 5-level paging and SME active (mem_encrypt=on), the variables are needed as part of the page table setup needed to encrypt the kernel (using pgd_none(), p4d_offset(), etc.). Since the variables haven't been set, the page table manipulation is done as if 4-level paging is active, causing the system to crash on boot. While only a subset of the assignments that were moved need to be set early, move all of the assignments back into check_la57_support() so that these assignments aren't spread between two locations. Instead of just reverting the fix, this uses the new RIP_REL_REF() macro when assigning the variables. Fixes: 63bed9660420 ("x86/startup_64: Defer assignment of 5-level paging global variables") Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/2ca419f4d0de719926fd82353f6751f717590a86.1711122067.git.thomas.lendacky@amd.com
Diffstat (limited to 'arch/arm/lib')
0 files changed, 0 insertions, 0 deletions