Skip to content

Commit 314a028

Browse files
labbottgregkh
authored andcommitted
x86: Use __nostackprotect for sme_encrypt_kernel
commit 91cfc88 upstream. Commit bacf6b4 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") moved some parameters into a structure. The structure was large enough to trigger the stack protection canary in sme_encrypt_kernel which doesn't work this early, causing reboots. Mark sme_encrypt_kernel appropriately to not use the canary. Fixes: bacf6b4 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") Signed-off-by: Laura Abbott <labbott@redhat.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f054314 commit 314a028

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/mm/mem_encrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static unsigned long __init sme_pgtable_calc(unsigned long len)
487487
return total;
488488
}
489489

490-
void __init sme_encrypt_kernel(struct boot_params *bp)
490+
void __init __nostackprotector sme_encrypt_kernel(struct boot_params *bp)
491491
{
492492
unsigned long workarea_start, workarea_end, workarea_len;
493493
unsigned long execute_start, execute_end, execute_len;

0 commit comments

Comments
 (0)