]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
x86: Use __nostackprotect for sme_encrypt_kernel
authorLaura Abbott <labbott@redhat.com>
Sun, 21 Jan 2018 01:14:02 +0000 (17:14 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 21 Jan 2018 01:22:54 +0000 (17:22 -0800)
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>
arch/x86/mm/mem_encrypt.c

index 3ef362f598e3ed16f9f1b45d409fe800c2736ded..e1d61e8500f9b84790c2f289708f9a61a5d2ecb7 100644 (file)
@@ -738,7 +738,7 @@ static unsigned long __init sme_pgtable_calc(unsigned long len)
        return total;
 }
 
-void __init sme_encrypt_kernel(struct boot_params *bp)
+void __init __nostackprotector sme_encrypt_kernel(struct boot_params *bp)
 {
        unsigned long workarea_start, workarea_end, workarea_len;
        unsigned long execute_start, execute_end, execute_len;