From: Laura Abbott <labbott@redhat.com>
To: Ingo Molnar <mingo@kernel.org>, Tom Lendacky <thomas.lendacky@amd.com>
Cc: Laura Abbott <labbott@redhat.com>, Borislav Petkov <bp@suse.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Brijesh Singh <brijesh.singh@amd.com>, X86 ML <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: Use __nostackprotect for sme_encrypt_kernel
Date: Sat, 20 Jan 2018 17:14:02 -0800 [thread overview]
Message-ID: <20180121011402.9557-1-labbott@redhat.com> (raw)
In-Reply-To: <b7a8e990-9d1d-39b2-671d-a44d5647dbec@amd.com>
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>
---
I hadn't seen this picked up yet so sending explicitly
---
arch/x86/mm/mem_encrypt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 3ef362f598e3..e1d61e8500f9 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -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;
--
2.15.1
next prev parent reply other threads:[~2018-01-21 1:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 1:23 Boot regression with bacf6b499e11 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") on top of -rc8 Laura Abbott
2018-01-20 2:23 ` Gabriel C
2018-01-20 4:02 ` Laura Abbott
2018-01-20 5:25 ` Gabriel C
2018-01-20 6:15 ` Tom Lendacky
2018-01-20 6:57 ` Laura Abbott
2018-01-20 7:03 ` Laura Abbott
2018-01-20 12:08 ` Gabriel C
2018-01-20 12:33 ` Ingo Molnar
2018-01-20 13:13 ` Ingo Molnar
[not found] ` <d2b236d9-ccfc-0cd0-f097-9daba70b86ff@redhat.com>
2018-01-20 17:34 ` Tom Lendacky
2018-01-21 1:14 ` Laura Abbott [this message]
2018-01-21 1:23 ` [PATCH] x86: Use __nostackprotect for sme_encrypt_kernel Linus Torvalds
2018-01-21 1:49 ` Gabriel C
2018-01-21 4:16 ` Linus Torvalds
2018-01-21 9:37 ` Greg Kroah-Hartman
2018-01-21 9:50 ` Ingo Molnar
2018-01-21 10:36 ` Greg Kroah-Hartman
2018-01-21 8:46 ` Ingo Molnar
2018-01-20 12:01 ` Boot regression with bacf6b499e11 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") on top of -rc8 Gabriel C
2018-01-20 2:38 ` Linus Torvalds
2018-01-20 4:13 ` Tom Lendacky
2018-01-20 12:12 ` Ingo Molnar
2018-01-20 15:35 ` Laura Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180121011402.9557-1-labbott@redhat.com \
--to=labbott@redhat.com \
--cc=bp@suse.de \
--cc=brijesh.singh@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).