Received: by 10.223.185.116 with SMTP id b49csp1022040wrg; Wed, 21 Feb 2018 10:43:01 -0800 (PST) X-Google-Smtp-Source: AH8x227l8exSxdfeWjdahNd+a8U5cbP/+CeqxujEx0Yj3vM9FGUtkCfDJtZFSI9ns/PxTNlwHg50 X-Received: by 2002:a17:902:d205:: with SMTP id t5-v6mr4115861ply.322.1519238581157; Wed, 21 Feb 2018 10:43:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238581; cv=none; d=google.com; s=arc-20160816; b=nweLnpVxEOo4LbjNXgpqWz4fDO8rX/B9k8gTrOQ/Z/CFyyfHjqZlutCrSM8kwUFKg8 sdghQc8IE0vZwSLqV+Y5dI14VSzH7HEiPRYg937HAu36xWS1COCZDGAeaZDd6Qr40SdZ xqmH0P9fSzoRcK6sMFS2fEgRyEpU3gYeLbYhnfwT547ISKjMIgquO5yW/NNAO+pf/dYa rmwkBH0zwKythdjiq31hLpamv1IjefNMCwG2tXAyLLU+pvaEGAYcjSi1CYLUIr+EfPvn 25dR30Vv7TEd9TuNzoVhGpOnY6yZ68hLjO63MsvgchULAmOlMMoqSZcHszVCrIgUt/ek ZWGg== 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=+y7i7exoJD7yVow4SwZEDfnqHMGk4oTIH8LhKsVtdhI=; b=BKqoOIcc0DBmDm9yISIAl6kNUdDfyZ/64V51ZwJtPj5Q1fOQWloZVmWRv/Oi5lNOmT aF31JEsS0MhCFDYEtswE6N/6utb7GXEDFiJ6/rXkqwS+CZjZOa0OI8TagC7hKjQ9YP4T MKIG0n/PLGIjqm/0s9ORqYUxIyeFyQmLSX56Ijt0VkSibL5fOP6HBcmde6HR/v7axBAI yzbq1c6ia1T04yzeHosDyGMo40tjI/2WsMkwKu1WwEAPbX1XZZqeBAvfxSlQP2gMR6Y3 aGHrVFNxvlRCv3U/upF3a2bimgEK75K9P0H7o/v7fDKkO60sQI/IdC/UkF0olc28Yyi5 2xVg== 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 h11si238425pgp.297.2018.02.21.10.42.47; Wed, 21 Feb 2018 10:43:01 -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 S936688AbeBUN07 (ORCPT + 99 others); Wed, 21 Feb 2018 08:26:59 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44496 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936324AbeBUNLO (ORCPT ); Wed, 21 Feb 2018 08:11:14 -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 F41DF1060; Wed, 21 Feb 2018 13:11:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Shanker Donthineni , Catalin Marinas Subject: [PATCH 4.15 095/163] arm64: Add missing Falkor part number for branch predictor hardening Date: Wed, 21 Feb 2018 13:48:44 +0100 Message-Id: <20180221124535.585976745@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shanker Donthineni commit 16e574d762ac5512eb922ac0ac5eed360b7db9d8 upstream. References to CPU part number MIDR_QCOM_FALKOR were dropped from the mailing list patch due to mainline/arm64 branch dependency. So this patch adds the missing part number. Fixes: ec82b567a74f ("arm64: Implement branch predictor hardening for Falkor") Acked-by: Marc Zyngier Signed-off-by: Shanker Donthineni Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpu_errata.c | 9 +++++++++ arch/arm64/kvm/hyp/switch.c | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -408,6 +408,15 @@ const struct arm64_cpu_capabilities arm6 }, { .capability = ARM64_HARDEN_BRANCH_PREDICTOR, + MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), + .enable = qcom_enable_link_stack_sanitization, + }, + { + .capability = ARM64_HARDEN_BP_POST_GUEST_EXIT, + MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), + }, + { + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN), .enable = enable_smccc_arch_workaround_1, }, --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -400,8 +400,10 @@ again: u32 midr = read_cpuid_id(); /* Apply BTAC predictors mitigation to all Falkor chips */ - if ((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR_V1) + if (((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR) || + ((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR_V1)) { __qcom_hyp_sanitize_btac_predictors(); + } } fp_enabled = __fpsimd_enabled();