Received: by 10.223.176.5 with SMTP id f5csp1018398wra; Fri, 2 Feb 2018 09:47:49 -0800 (PST) X-Google-Smtp-Source: AH8x225OmeiCBXlt1wTC57/rERNgyxHe2iNc021WsFEAmfaUG4lSPRUVGFycYhgIpEXs+SR+VEVL X-Received: by 10.98.64.9 with SMTP id n9mr41390285pfa.194.1517593669583; Fri, 02 Feb 2018 09:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517593669; cv=none; d=google.com; s=arc-20160816; b=aN91ZURmKhbw+UMxiQDmylkYwYpG4Ya733F8Y0POCqKGVEsPXr3SRoRfM/oGoZCh6K vpGT6NVsNX5b4KjvTem2U3Hahyh0FyFIrwP2m6Zo41UnzbQLgyPaH0DHi9cWBd3tmsFD PyLiNcCwn45AhQu3ZY4owIeHyRL5fBY0nJJnJEkQTQfm4I3Ss2ylir3fbjF7F4dZUUK7 qSDdukbSXjWZCPgxiRIfPCQdDwce7wVFuGiANv8CKZy1vqJE+qAwQzaQ1oH5IYzdsEpo AFyGMz6MYj/gna3feEq3Li42ps/6WXZfwH6lkhGs+Q3xJr85AAiZNWy6Ja/PMN45qYVI YVDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yuihUbh0XEAtraCEltfLhbLpxxwS9sqBp/ibIx393EM=; b=S7OpPYVa3BoJtnk9NKdSa+Muwn3zTOCJawdsZegLLnXOoYQ4jro2r98AtMNs9mbj6E sKaqck/Tc8c9U14cDypMQxIAlqS61Y8qPL4yv49LKt33x5XpIYN6sN3Y+KUfLTdTcCiA pH5/8QZMbk2wu2Ds+EjxB6ym45p4jhbFs6gQsnrbSbAlAF/MyeGY9COMHLxaD28TlbIY BsTuztUdrAJfWaBsg7wOa2RDGlg+9M4LY+ris0wSwDJqa5H4Qr0H5E8fXdYnD7ZHBK64 5hifUji0BItfY8FpBy5DqWbCI8/+vOk0Vvu+9hiG/mJjsSfIVvclA1qgTSQDE2NSbxAe u4yw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a63si1416691pfk.72.2018.02.02.09.47.34; Fri, 02 Feb 2018 09:47:49 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753693AbeBBRq0 (ORCPT + 99 others); Fri, 2 Feb 2018 12:46:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40448 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753601AbeBBROS (ORCPT ); Fri, 2 Feb 2018 12:14:18 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EA05BAD8; Fri, 2 Feb 2018 17:14:17 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthew Garrett , Ard Biesheuvel , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , linux-efi@vger.kernel.org, Ingo Molnar Subject: [PATCH 4.14 156/156] x86/efi: Clarify that reset attack mitigation needs appropriate userspace Date: Fri, 2 Feb 2018 17:58:57 +0100 Message-Id: <20180202140847.458165935@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthew Garrett commit a5c03c31af2291f13689d11760c0b59fb70c9a5a upstream. Some distributions have turned on the reset attack mitigation feature, which is designed to force the platform to clear the contents of RAM if the machine is shut down uncleanly. However, in order for the platform to be able to determine whether the shutdown was clean or not, userspace has to be configured to clear the MemoryOverwriteRequest flag on shutdown - otherwise the firmware will end up clearing RAM on every reboot, which is unnecessarily time consuming. Add some additional clarity to the kconfig text to reduce the risk of systems being configured this way. Signed-off-by: Matthew Garrett Acked-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/firmware/efi/Kconfig +++ b/drivers/firmware/efi/Kconfig @@ -159,7 +159,10 @@ config RESET_ATTACK_MITIGATION using the TCG Platform Reset Attack Mitigation specification. This protects against an attacker forcibly rebooting the system while it still contains secrets in RAM, booting another OS and extracting the - secrets. + secrets. This should only be enabled when userland is configured to + clear the MemoryOverwriteRequest flag on clean shutdown after secrets + have been evicted, since otherwise it will trigger even on clean + reboots. endmenu