From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756802AbeAUBOY (ORCPT ); Sat, 20 Jan 2018 20:14:24 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:46324 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756750AbeAUBOR (ORCPT ); Sat, 20 Jan 2018 20:14:17 -0500 X-Google-Smtp-Source: AH8x224X4nTFFho9va81u6Th4Oyd7sqmBVEnLolvQberZmu5eZofUcDtLTYLtx3w0rHRaW2n9jYYcQ== From: Laura Abbott To: Ingo Molnar , Tom Lendacky Cc: Laura Abbott , Borislav Petkov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Brijesh Singh , X86 ML , Linux Kernel Mailing List Subject: [PATCH] x86: Use __nostackprotect for sme_encrypt_kernel Date: Sat, 20 Jan 2018 17:14:02 -0800 Message-Id: <20180121011402.9557-1-labbott@redhat.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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