Received: by 10.223.176.46 with SMTP id f43csp2793246wra; Mon, 22 Jan 2018 03:33:58 -0800 (PST) X-Google-Smtp-Source: AH8x227VeZRQjG/3WqDK+4HXnV3TPwMxBcIbjYeOMxPSF4VHZ7CxwwBu1yOOrSKOuuzBGLbVi9b2 X-Received: by 10.101.67.130 with SMTP id m2mr6782800pgp.301.1516620838587; Mon, 22 Jan 2018 03:33:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516620838; cv=none; d=google.com; s=arc-20160816; b=oi1AoE+33Adf1OlB+J7Bp37r8aN1TVuGbJwVhWVgF2hm9DJ/1ejSa0SYb+n5nbEEPt ZnQXNjen4E8t54XrHRGDHi/ZrB0pXIJwvsio+J/aZRyQGCXbf6Ajf/5l7Z2a6ensj9Pt DIFJKUiKsK9PaKZoXzKPfZFjPYqXWne0kwfBRynX8ssG4F7QrBOi1U89giTYWCo6HFjS eOO6a6ILxYElXSSkvINxH5kslvv/n77EgvyrjWrrbg+hckXHAcBpXd2oH9o7w5nrmyGR ugh77jf4OrrYlxRBhfF7NTNQRq5s+11YZri2mObfVdJci+qj6s7lPvZHT8DAZqT7xIc/ Xmew== 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=cVyKYUu6g45ZB7my6RJpm3iZQBhU2Vhq7MQlp8aJnaU=; b=NXAl4zcBJV6V/Jng1CIpo/fLLCku3/FZcgxLunIg0hJpF1R8ESXKIlhz+cI6Pe81Zf q631IkPvSrB0bsZx0DVWD+dcLhurUzM+5vQMnkN+uu5rQUnUYtjWcUam0NOU3u6TTHbc Z+3KvNhxYY51+gEruE3GPqFeMDzSfF7o6EA+S+Htfk5C6GDmIyPdn4zfk1JAP1PZPphq b44xXhfphCQtdgeLmXZ+Q+yWRkBq8Q35fI1Dz1ogV84KVovhxIt3LHgeZaJ2Ye3jzJyn 0LEKCdDDefUhiYMA0J5m+TmFhbAfuxcL7pvBXfPLO4NNXH/jXxD2hJrg0iNjLfNIHm3Y rMkA== 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 g78si54282pfe.174.2018.01.22.03.33.41; Mon, 22 Jan 2018 03:33:58 -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 S1751133AbeAVLdG (ORCPT + 99 others); Mon, 22 Jan 2018 06:33:06 -0500 Received: from foss.arm.com ([217.140.101.70]:57406 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbeAVLdE (ORCPT ); Mon, 22 Jan 2018 06:33:04 -0500 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 3C6AE1529; Mon, 22 Jan 2018 03:33:04 -0800 (PST) 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 0A51B3F53D; Mon, 22 Jan 2018 03:33:04 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id DDB661AE2F75; Mon, 22 Jan 2018 11:33:11 +0000 (GMT) Date: Mon, 22 Jan 2018 11:33:11 +0000 From: Will Deacon To: Jayachandran C Cc: Jon Masters , marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, lorenzo.pieralisi@arm.com, ard.biesheuvel@linaro.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, labbott@redhat.com, christoffer.dall@linaro.org Subject: Re: [PATCH v3 1/2] arm64: Branch predictor hardening for Cavium ThunderX2 Message-ID: <20180122113311.GB15456@arm.com> References: <20180118135354.GB20783@arm.com> <1516364568-95577-1-git-send-email-jnair@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516364568-95577-1-git-send-email-jnair@caviumnetworks.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 On Fri, Jan 19, 2018 at 04:22:47AM -0800, Jayachandran C wrote: > Use PSCI based mitigation for speculative execution attacks targeting > the branch predictor. We use the same mechanism as the one used for > Cortex-A CPUs, we expect the PSCI version call to have a side effect > of clearing the BTBs. > > Signed-off-by: Jayachandran C > --- > arch/arm64/kernel/cpu_errata.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c > index 70e5f18..45ff9a2 100644 > --- a/arch/arm64/kernel/cpu_errata.c > +++ b/arch/arm64/kernel/cpu_errata.c > @@ -338,6 +338,16 @@ const struct arm64_cpu_capabilities arm64_errata[] = { > .capability = ARM64_HARDEN_BP_POST_GUEST_EXIT, > MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR_V1), > }, > + { > + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, > + MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN), > + .enable = enable_psci_bp_hardening, > + }, > + { > + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, > + MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2), > + .enable = enable_psci_bp_hardening, > + }, > #endif Thanks. Acked-by: Will Deacon Will