x86: Use __nostackprotect for sme_encrypt_kernel
authorLaura Abbott <labbott@redhat.com>
Sun, 21 Jan 2018 01:14:02 +0000 (17:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jan 2018 18:58:19 +0000 (19:58 +0100)
commit314a028c1f49cf79e6b443e21a70f5243d7df21f
tree461735e69d6535555f9592c7ef771f1c2a5e3969
parentf05431489fe654ba0df6fc8ab272a438bc702c62
x86: Use __nostackprotect for sme_encrypt_kernel

commit 91cfc88c66bf8ab95937606569670cf67fa73e09 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/mm/mem_encrypt.c