Received: by 10.223.176.46 with SMTP id f43csp1356041wra; Sat, 20 Jan 2018 17:17:14 -0800 (PST) X-Google-Smtp-Source: AH8x227XP645Orn8A54jJNrUEaJGXPwfW+n2Z+7z8qNErHQzspx9jpvcHG7rhNjm6Qyg8UUpgsQ2 X-Received: by 2002:a17:902:d688:: with SMTP id v8-v6mr1521269ply.302.1516497434223; Sat, 20 Jan 2018 17:17:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516497434; cv=none; d=google.com; s=arc-20160816; b=ScomkTJGM7ci1yKV7i6HtkgYnGbxF2d0SqVHnMh3N2RAbqKZK25QfZXgvttySHN8f/ FB0ZiRZF/QUG2m3UZTTHxI2uN6Eabd+3SLhbL7AgD/YuPOjH2H/0zBt+cEyhy0xhRwQM Hn6XUVzr3P9K+2XCqfj63K78UWJ6JDrl+7YUBqjvs3twF5+hCfnOff1Mn8laAo1SUxm7 U4MRiYTO+r1aUExENoPKnfpKjuWJ03kxfRO01S6aNzNNu9CFLRq/ntPNjRzGRFFdPOkB 3CBCn2kMWsahhabUIWDFogYN0BTa/zuT0jMhzroQVxBSxw9Qhg2IhX3Qpvf1ETc1qYrQ xsLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:message-id:date:subject:cc:to :from:arc-authentication-results; bh=mkJTPd0QN+VupspoYc6Y3plYe+vYAjOep3ltQREK648=; b=UtcwGi6PXd3laMWWStLLf6RFaX+FQvOAEyMkKNk6+/BIWUu11uRbYTsBuslvGH+SvW y7HBNbGbE4A+7OSXZJM9vqW6AzL2XW1QCpSgyHO8HA+HBnoTU4GqPr/hBmD6X9IkupQL hrOCUB0lnbdkdSiprTqByoauCJwWBFZywYy7u5KRgXQXKIOPKQphQofYgQfXsEYrTt/V LyS79EJjbYUU8LUnoZmEOJ5qp9kMX3+7GzO5uztQrZoCzaodMzDhk+IY+rWopjEmRl6w hXnCxZyf4dbTpljw5kWX/yceY6lr4xeRmd9yln+70LnKSxxnPxdhvvg8e8X8iqIY9z2E 3N0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si10862098pgt.705.2018.01.20.17.17.00; Sat, 20 Jan 2018 17:17:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756791AbeAUBOW (ORCPT + 99 others); Sat, 20 Jan 2018 20:14:22 -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 Received: by mail-pg0-f65.google.com with SMTP id s9so4281467pgq.13 for ; Sat, 20 Jan 2018 17:14:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to; bh=mkJTPd0QN+VupspoYc6Y3plYe+vYAjOep3ltQREK648=; b=r2IxK/zgM8sAEw8RQf1+nJmOwYOwJzduBhsKW08nCCwX9SwmEh1rcnjX10SEAA8tGI yYFbveVpzh6YVaco/y0nEIjZz3LqdYAi2e9RNDhLCejj4Dnyhruol4SKA7LwnRqx/hW6 52XphrYN5bQXE0d8ztPnoDcX8MNWK8uLNOrG2GmkQQCl189Fkhegj8Ua5Tn6dYhCUEJM mGA6TXaucp59/I886bavah3O4s6NepHFo6fmRUPqsCgVspJQ8+fYQJ7GrAI3LVk4PNGM l+NQWenwmuX2Rw2zkeOe6MKeaCm9rHYvRULjQkA1+v7ae8g3wBymJTbYD1iHxT2HUJjQ fcTQ== X-Gm-Message-State: AKwxytdGdCoINImOB+Jb8F9ii+WNYUAo5KAkokFGfSRzGSZCmYpfcXTs 4RxssY1Wjvsqzz1ANOvIOUkcsQ== X-Received: by 10.101.81.141 with SMTP id h13mr3374181pgq.241.1516497256662; Sat, 20 Jan 2018 17:14:16 -0800 (PST) Received: from localhost.net ([2601:602:9802:a8dc::61c1]) by smtp.gmail.com with ESMTPSA id t65sm12024898pgc.39.2018.01.20.17.14.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 Jan 2018 17:14:15 -0800 (PST) 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 Precedence: bulk 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