Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4627255imm; Wed, 30 May 2018 08:59:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKB4+mD9lUMXnKnLhIfZUcZK63yvTe3HsV3zcKUMDbnD75Fi8GyhVvpEyekabdoitvMWWEF X-Received: by 2002:a17:902:a60e:: with SMTP id u14-v6mr3332378plq.233.1527695954375; Wed, 30 May 2018 08:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527695954; cv=none; d=google.com; s=arc-20160816; b=vAnVw8nTMmNF9CaBR3CZ58PVNK3z2f9ymsCi1tw+EvCtGNnn3aZMdKkE9dm9OyFgOt V/tyRcZwEILC9uM6X+quuLxLQpnUF714mXbIjyq+YA4LiJYiMFgyF11wzriBV36bAUpB 6RQQDSG4P6bDZt5BHTvS3CM3BV+GVX5G6LiG58gjsPn15sqDfT0XtIn3tOvuQDc9Vmb7 N+/6SO9oXgfPFZMAOiJALxjojtrDyRqgOaQ5GJVIa54PhfoKieV5hlixQuYs/Z/SVElV rSEE9XXQre2bgEh4kbraHMLymbDBZ6k40BZgUN0J5yHLdbGpSZP9r1W+piGPCeYrhr+u l6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=vfPGjcCjHviGDrNcU7oh5pUoJ9ueQepdxyhyudHhgpM=; b=qL397EJrQi7n3A3204rI+P89fJbD8plo005FVh7E00coQlrImcF0HlBIqX9oMvXtei wRr2YBDi1oyJcgcwXP+WgKMz1YZqE53MzcDG7I6t7oPsenWf2JUm9fLv62gQfGJB0gCI rPpb0phLEPK7OTH6b/y/m7Xf6/8yp89FVKHHmkQ22+xAlbpsxJ0wW+vQnOphOERDnSRh 98e1jiimIObfaNnp/6/C4rvclL/KWkQ094G+l0ss/r2YH+/fC5zVZcpjwrU9JAtsVbWt uVNy9ddpFrmjL0mZsG+TqUN+G89RQjJGxrvuehtnW40Ass7jQ/zAqtCGSnROlSQ6ZQ1d IAFQ== 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 p7-v6si33948843plk.293.2018.05.30.08.59.00; Wed, 30 May 2018 08:59:14 -0700 (PDT) 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 S1753844AbeE3P62 (ORCPT + 99 others); Wed, 30 May 2018 11:58:28 -0400 Received: from foss.arm.com ([217.140.101.70]:58660 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753770AbeE3P6Z (ORCPT ); Wed, 30 May 2018 11:58:25 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F26015AD; Wed, 30 May 2018 08:58:25 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 706EA3F24A; Wed, 30 May 2018 08:58:25 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 653EB1AE4DC6; Wed, 30 May 2018 16:58:55 +0100 (BST) Date: Wed, 30 May 2018 16:58:55 +0100 From: Will Deacon To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Catalin Marinas , Thomas Gleixner , Andy Lutomirski , Kees Cook , Greg Kroah-Hartman , Christoffer Dall , Randy Dunlap , Dominik Brodowski , Julien Grall , Mark Rutland Subject: Re: [PATCH v2 00/17] arm64 SSBD (aka Spectre-v4) mitigation Message-ID: <20180530155854.GA4122@arm.com> References: <20180529121121.24927-1-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180529121121.24927-1-marc.zyngier@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On Tue, May 29, 2018 at 01:11:04PM +0100, Marc Zyngier wrote: > This patch series implements the Linux kernel side of the "Spectre-v4" > (CVE-2018-3639) mitigation known as "Speculative Store Bypass Disable" > (SSBD). > > More information can be found at: > > https://bugs.chromium.org/p/project-zero/issues/detail?id=1528 > https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability > > For all released Arm Cortex-A CPUs that are affected by this issue, then > the preferred mitigation is simply to set a chicken bit in the firmware > during CPU initialisation and therefore no change to Linux is required. > Other CPUs may require the chicken bit to be toggled dynamically (for > example, when switching between user-mode and kernel-mode) and this is > achieved by calling into EL3 via an SMC which has been published as part > of the latest SMCCC specification: > > https://developer.arm.com/cache-speculation-vulnerability-firmware-specification > > as well as an ATF update for the released ARM cores affected by SSBD: > > https://github.com/ARM-software/arm-trusted-firmware/pull/1392 > > These patches provide the following: > > 1. Safe probing of firmware to establish which CPUs in the system > require calling into EL3 as part of the mitigation. > > 2. For CPUs that require it, call into EL3 on exception entry/exit > from EL0 to apply the SSBD mitigation when running at EL1. > > 3. A command-line option to force the SSBD mitigation to be always on, > always off, or dymamically toggled (default) for CPUs that require > the EL3 call. > > 4. An initial implementation of a prctl() backend for arm64 that allows > userspace tasks to opt-in to the mitigation explicitly. This is > intended to match the interface provided by x86, and so we rely on > their core changes here. The seccomp interface is provided as an > extra set of patches, which I'd like *not* to see merged. The main > reason is that it is invasive, has ugly/unclear semantics, and could > probably be left to the existing prctl interface. I agree with you here. For patches 1-10, then: Acked-by: Will Deacon but I'd prefer to leave the seccomp stuff alone for the moment because I don't think the implicit enabling is necessarily the right thing to do there and supporting it comes at a cost. Will