Received: by 10.223.176.46 with SMTP id f43csp1413562wra; Fri, 19 Jan 2018 11:10:03 -0800 (PST) X-Google-Smtp-Source: ACJfBotsfHSqJ8u0UiV9R7lgPSzMa8CvNTiwU1ARNqy31FHkYTjHe0tY8K6pQUzVwmOHvfg9gGNn X-Received: by 10.101.81.7 with SMTP id f7mr42342012pgq.425.1516389003050; Fri, 19 Jan 2018 11:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516389003; cv=none; d=google.com; s=arc-20160816; b=TqO6ZeWXwVB0HQA+0cmf0NBRr0zsGHgUSzDWF3ccuCVVOPXSBNE8LumFSK3iieEWo+ wlhUuIBAK4g03DVc/BkxmXu6VuSif4qlwRZTQ4pFqIzfxwMuOHsQ+s4sXMVV3f3niuDp xfh9Z6SEqujbVxA2fYADQB3+dTeITwqaB2Ek63Ttiup7IrnLuagqZ/BXoOf6+j3AQU2o GjzS+00b1QkxO1jRAlUt1mSNRM1oGvaWVbH9NS1s5A0ZBiuNIaf/9Ag3tWoVlolak8f6 9KcxwBPffdVOiTo9mVIhEDTJqICSl5PShwLXjnb6rStt+RwC7gkh6fYUK6wbNjuQiP3i mxmA== 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=IdMcrrJQ80fHX/oh8+nnNiDI9KYWuPPWFbo8BWRUzi8=; b=0t4QzoxAfJR3B1BEDM6r/yT1p5A4ZCPAwE0QfpTVa0Dr0PMd2SitYAPHVlq8bPjxIZ 8LU8mUsQelvZDKAwaPgkBEKP9nS8DMYT6dpoI6Jj5rdwWlu4yAEffyyVDnVS+RpqAsCS NKlSCKDYTIYS/BIa0CJIeloGlL1D8yMzg79ufif8TWceuDIYJIXwMt8uP7zH3yk767aY ueuftVBGUafdwL8Kaswb3iru0k8WHoE/D0P632kF41kkyq9mEiuG/Jb6u74UQ6Nuf71W gOAjUKV+PsOmKLt32KwZ3t5YdRVq8a86xQgyr7SccdjdXgII7VJVi0tyb0S4RMYwM+jm 7QwA== 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 t130si3243735pgc.236.2018.01.19.11.09.49; Fri, 19 Jan 2018 11:10:03 -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 S932314AbeASTJI (ORCPT + 99 others); Fri, 19 Jan 2018 14:09:08 -0500 Received: from edison.jonmasters.org ([173.255.233.168]:40948 "EHLO edison.jonmasters.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756030AbeASTJA (ORCPT ); Fri, 19 Jan 2018 14:09:00 -0500 Received: from boston.jonmasters.org ([74.92.29.237] 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 1ecc25-00045r-R7; Fri, 19 Jan 2018 19:08:58 +0000 To: Jayachandran C , Will Deacon References: <20180118135354.GB20783@arm.com> <1516364568-95577-1-git-send-email-jnair@caviumnetworks.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: <9be02a5d-7d2d-7c61-e593-056be65ff26b@jonmasters.org> Date: Fri, 19 Jan 2018 14:08:56 -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: <1516364568-95577-1-git-send-email-jnair@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 74.92.29.237 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, T_RP_MATCHES_RCVD,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/19/2018 07:22 AM, 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 > { > } > Both of these patches seem reasonable to me.