Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86: Use __nostackprotect for sme_encrypt_kernel

Commit bacf6b499e11 ("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: bacf6b499e11 ("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>

authored by

Laura Abbott and committed by
Linus Torvalds
91cfc88c 24b61240

+1 -1
+1 -1
arch/x86/mm/mem_encrypt.c
··· 738 738 return total; 739 739 } 740 740 741 - void __init sme_encrypt_kernel(struct boot_params *bp) 741 + void __init __nostackprotector sme_encrypt_kernel(struct boot_params *bp) 742 742 { 743 743 unsigned long workarea_start, workarea_end, workarea_len; 744 744 unsigned long execute_start, execute_end, execute_len;