Received: by 10.223.176.46 with SMTP id f43csp3262736wra; Mon, 22 Jan 2018 11:01:47 -0800 (PST) X-Google-Smtp-Source: AH8x2257ubGO4C2vJBfWs+P1UB+57e97VTJnQxrRcT+S+H7z/VWudNBpUd3TimYogYd8FNo1JznZ X-Received: by 10.36.110.85 with SMTP id w82mr9814175itc.118.1516647707831; Mon, 22 Jan 2018 11:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516647707; cv=none; d=google.com; s=arc-20160816; b=D/A88m0wneaTfzzBwLHNKI5NGuziArQSMpkc6pOcGXuzQ5lWelEpMhtIOmiNJYYZLY 768rhdnLgN4UvFbnr3x9I1sjNhnkB4/2vBfDk7dxD1EI4SXGlf9LOfJBIAlxZ240gwg/ /Kz4uuynCLnAWA59VLk7dfN/BbYkEKI8p/sxNe1gwYSZWF2ZmZzTTFBbHIMgCRXgVovj nbn9YJDD4z118mBcNzgTlHkQbwFMgvv9zsCBGnu/BkjqbXJyROQqKSmPdcesuXi0BbXW d8De9GZyuLrqf9v/LJDy8jQbgux5B2ymbD/rp9AxbVOziTqJo2EUc1W1u4DjIRm6wFX7 RQyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:organization :from:cc:references:to:arc-authentication-results; bh=uU1C7ewUh8zkUCYgchr87/rPaVpeS4wlphOxasUeT+0=; b=Nk+OQICOTe6nv6b+iNAURyWAichh0GzZCdrdOOUtMqKD2vUftBweIC/kw7OSiPiohR b/+HdvlwmVeW8+nl/CLrdFiWXZ++gU4XTeGi1haob3HJYUAEz76JW5+y/CaVpox+r1lH tBd9OuuKuXvbM0rcNiefVk53yH8utOCKPxIpKBOrHfAB4frMxLZBPSFyBKYb5O5fsWsl 3eGrd0YkcQitKjP2omemjc3utz6eyde/rGKgT3kw/GZscrW4F0HXB5I+CzQtSRrHvl9y qlJdq/3Hc2pW4i+wMABxsyoeWQ/tbRCa43H0z8yDED3zrGv/bJJpqDJpX4ZHbHT+8/HJ Ms+w== 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 f186si6559175itg.165.2018.01.22.11.01.34; Mon, 22 Jan 2018 11:01:47 -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 S1751465AbeAVTBJ (ORCPT + 99 others); Mon, 22 Jan 2018 14:01:09 -0500 Received: from edison.jonmasters.org ([173.255.233.168]:55870 "EHLO edison.jonmasters.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbeAVTBH (ORCPT ); Mon, 22 Jan 2018 14:01:07 -0500 Received: from cpe-68-173-157-109.nyc.res.rr.com ([68.173.157.109] helo=washington.bos.jonmasters.org) by edison.jonmasters.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edhL7-0003q1-70; Mon, 22 Jan 2018 19:01:05 +0000 To: Will Deacon , Jayachandran C References: <20180118135354.GB20783@arm.com> <1516364568-95577-1-git-send-email-jnair@caviumnetworks.com> <20180122113311.GB15456@arm.com> Cc: 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 From: Jon Masters Organization: World Organi{s,z}ation Of Broken Dreams Message-ID: <2232c6e4-c55f-4e57-c58f-2bfc02b2fac2@jonmasters.org> Date: Mon, 22 Jan 2018 14:00:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20180122113311.GB15456@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 68.173.157.109 X-SA-Exim-Mail-From: jcm@jonmasters.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on edison.jonmasters.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.1 Subject: Re: [PATCH v3 1/2] arm64: Branch predictor hardening for Cavium ThunderX2 X-SA-Exim-Version: 4.2.1 (built Sun, 08 Nov 2009 07:31:22 +0000) X-SA-Exim-Scanned: Yes (on edison.jonmasters.org) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/22/2018 06:33 AM, Will Deacon wrote: > 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 Thanks. I have separately asked for a specification tweak to allow us to discover whether firmware has been augmented to provide the necessary support that we need. That applies beyond Cavium. (for now in RHEL, we've asked the vendors to give us a temporary patch that we can match DMI or other data later in boot and warn users on) Jon.