From patchwork Thu Sep 19 22:04:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 174106 Delivered-To: patch@linaro.org Received: by 2002:a92:6d09:0:0:0:0:0 with SMTP id i9csp1579099ilc; Thu, 19 Sep 2019 15:30:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3dZerqxfWukQAn8VW94sj/dfIrRV9SH86aAYciPRH0o9OSkwvZp+1pR1Ochj4VX/ED1xk X-Received: by 2002:a17:906:b2d4:: with SMTP id cf20mr13674512ejb.152.1568932256969; Thu, 19 Sep 2019 15:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568932256; cv=none; d=google.com; s=arc-20160816; b=U5xKuqu4lqoOYzRcEmARIDI9JrbkUqvLf+3KqbZ+9B1dBpBH017d6/Kzz3103M2nWz iGH9UXQ4SrTeFqZOq65Yw/FXXcXhZCO4sRrR92wClH1ASviSASmaMNdsPWR1W9YqcGAQ MyE9bIzPIZXW7jRX0iWFvG+No9AGBqU5weGfVftiIEa8ZRob6lEdbSHHUbfkOxhgV0Rv 1hUb4wHU/m+yrxc9o4v8KqkpxPUe6TJpX3AzrXlbY6Vcb+la9czMepwa23a3qJyMhpPu HPUaLzTrYxvHxElHY6aw32b/Rioh6cGqHeWBTG+93Y2XAEW0SGvTyjS3ZL8ir+T6PrrK itlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NHU8uAhqPrkHNJ+b7Dg/cB/AsWqcdWg0LqhPBv/8ejU=; b=Q67qNe2SfvkTiokXcq3HmEIZctZeIe+/Z6NNLRsexgrQctFtPcDT1AjxLR6a6RygOC Gi15wyre9wF+f7M2nqe6qDl795/4DkxDfgg1kqZ+F8/z7nNlIdfYKe3lqjFJZtLVsQjT dHkMnUQ77T6+VOo7WNp9vvSIMYEneZAhX0XyBnrxvjSqPz4Mxp6Wlu6UmQ4AM6XcTCaz yOCmaoK0JOT6JwhBIAKzF/AH2dfmNYAcV7F6mS7AxKJg44MPWlUYXUaSr6j/s/Wreztw NtjLzK+/HoTEVWZxbM3Q2EqFL/TtgawkM64HaFkx8wZFArEWjEUq5RE/u+Ubp7nlfZEt 0x4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LW9BVM7H; 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 10si1454751ejw.231.2019.09.19.15.30.56; Thu, 19 Sep 2019 15:30:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=LW9BVM7H; 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 S2406320AbfISWaz (ORCPT + 26 others); Thu, 19 Sep 2019 18:30:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:55370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406126AbfISWP0 (ORCPT ); Thu, 19 Sep 2019 18:15:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB659218AF; Thu, 19 Sep 2019 22:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931326; bh=7MGaVN2wL64VImoAPcctyBsgIy7kwhtcTXeqnOhqXb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LW9BVM7HUMFd6CwFwiALxgAcztryqeDxYe0mHBiiRJUX8L7dRSGDXCIoGdE0aGT3P crhpqjmyz+ZVAC0GC6EHAHcv9s1erohjTl0Fv/thhRsFapmTm2KkutHdEvEv730y3e nkKR3IAg061Swoumv9syvNQrPkWOQ4b4L5cu2Dc0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Niklas Cassel Subject: [PATCH 4.19 78/79] arm64: kpti: Whitelist Cortex-A CPUs that dont implement the CSV3 field Date: Fri, 20 Sep 2019 00:04:03 +0200 Message-Id: <20190919214814.627750263@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214807.612593061@linuxfoundation.org> References: <20190919214807.612593061@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon commit 2a355ec25729053bb9a1a89b6c1d1cdd6c3b3fb1 upstream. While the CSV3 field of the ID_AA64_PFR0 CPU ID register can be checked to see if a CPU is susceptible to Meltdown and therefore requires kpti to be enabled, existing CPUs do not implement this field. We therefore whitelist all unaffected Cortex-A CPUs that do not implement the CSV3 field. Signed-off-by: Will Deacon Cc: Niklas Cassel Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpufeature.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -895,6 +895,12 @@ static bool unmap_kernel_at_el0(const st static const struct midr_range kpti_safe_list[] = { MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2), MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A35), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A53), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A55), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A57), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A72), + MIDR_ALL_VERSIONS(MIDR_CORTEX_A73), { /* sentinel */ } }; char const *str = "command line option";