Message ID | 20221111171201.2088501-5-ardb@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3975EC4332F for <linux-arm-kernel@archiver.kernel.org>; Fri, 11 Nov 2022 17:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UsCXdbOofP24aJtO/vQswzAStycMRXlatyu8G1a7Fis=; b=PrzsUyJo36l2dW uuGNYweGgDSs1r/4ru+kwGK6jiXSO0Z7JhOB7d1BvlVnI5dz9+xCL1Ew15IqURw6EQ2I4orNA2Xwh BDJyVokXtxnUpaItWepmeZloQnRZ5/tadqL2jYQgR9vRm83ccj9kLCyCFgknwj4BNiAw/QANSan1x UkJpHnb0UGt6CcxZOOvkyjuMLoM2E1H3KmIcslAiBKHsTB/c38mykfKA8OlRGrWicU2cpV/FlkkVe uoeb+eoWdbsUrKBftatujpIT4MQSnz6G9k0PtpqimRh3ED+dnjNUHFaTmSG1JeOgEQoIEorFFeT2n NaZyJwpIJaImbL4Dqu1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otXbd-00H8WB-Po; Fri, 11 Nov 2022 17:14:18 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otXZu-00H7XM-80 for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 17:12:31 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F1A77B8266E; Fri, 11 Nov 2022 17:12:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CABB8C433C1; Fri, 11 Nov 2022 17:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668186747; bh=USSZOsJFDOvXgcBT4K5g9iMqI5O9MK9akV3y6MlIp1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SJhZJMBFxfaqpCzbLEY+0c9ZHtF/Cl6ZpJD5tjaoW+X4ijb9lJpBcXWXVhDZyKDml OQPxdk0qgh5v8+t+KkkmVpvi8zl2CMoYsXzvSC2/4bmAXxhffzzrFiFuz2V+0XiuRo d9F6DKunCu7lxi1VlYdngVrEmU1P53yz+3ia9QW2OQiE2YLL50CPTmsnhv5b8zD4IS fc6T1RNB78c89GORAwYyd7KnEsTLyMkkK4qAyTm/A7ql0v9X1E51ZJMpt+TcFQfDAA L5OXNALCXW6gPSqzqX0umKdV6E2N+oI3bAtMFaldqj9ZPvWRkFoK1l6d6OpwhnmT7T OZq1/vS924/ug== From: Ard Biesheuvel <ardb@kernel.org> To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel <ardb@kernel.org>, Marc Zyngier <maz@kernel.org>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, Catalin Marinas <catalin.marinas@arm.com>, Mark Brown <broonie@kernel.org>, Anshuman Khandual <anshuman.khandual@arm.com> Subject: [PATCH v7 04/33] arm64: kaslr: drop special case for ThunderX in kaslr_requires_kpti() Date: Fri, 11 Nov 2022 18:11:32 +0100 Message-Id: <20221111171201.2088501-5-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221111171201.2088501-1-ardb@kernel.org> References: <20221111171201.2088501-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1384; i=ardb@kernel.org; h=from:subject; bh=USSZOsJFDOvXgcBT4K5g9iMqI5O9MK9akV3y6MlIp1c=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjboIvz1I86NW1pYDTZJAk8iHtX1JB1uEOHQsVJ9p8 0avLSPaJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCY26CLwAKCRDDTyI5ktmPJGxWC/ 9cfwPnCC7kW2WG8ZPhSVI/VG8V5lBGPC+porm+EMJ5NsvjBskVxiqHvAtP1h8WBY8pKKnvEfOICF12 p/+/SHcqMaLZpziRIRgL/nnTHflQEQ+C1nJ7qCPSBizWngRxmLiAI8GOr7K2+Azn9PdY9+EeeqYwmc VnShYCs8YGBo2nuAX0X1p5xK9AbLk0MD/g5pzsl4NBWbeF4sHA9kVvuj15Psd45WwnjZmUhFg3DLKg zWzQoNEzrLMMzxnLScMCubvI7Zz+QLKjVlu3dCk5dTsLLqhnZDEVWwO4WUt7XwUIIy+u2Eg7lBjAIK suP7ydiRAK8h8TG24CO/UR8eAr/w7ntQSCu7Yfj15iR7LWHIgQ4bxPSjGPldxU28zcMqQL4SROdsKj z9aYKeOx+NVNAZI/yLKqdVyl2jH6IM65byEI+9IeRhtVFhoKiccXNnejxieK8ZrGxG2Ck7PryY15W7 MDkyHSngphZwMvJzI3ihDR9lT4nwqRRxKvzI7EGKUSO+0= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_091230_456508_D9A9CCE7 X-CRM114-Status: GOOD ( 13.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arm64: robustify boot sequence and add support for WXN
|
expand
|
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index ded7684b0a304edc..fdbae2320b466d98 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1608,18 +1608,6 @@ bool kaslr_requires_kpti(void) return false; } - /* - * Systems affected by Cavium erratum 24756 are incompatible - * with KPTI. - */ - if (IS_ENABLED(CONFIG_CAVIUM_ERRATUM_27456)) { - extern const struct midr_range cavium_erratum_27456_cpus[]; - - if (is_midr_in_range_list(read_cpuid_id(), - cavium_erratum_27456_cpus)) - return false; - } - return kaslr_enabled(); }
ThunderX is an obsolete platform that shipped without support for the EFI_RNG_PROTOCOL in its firmware. Now that we no longer misidentify small KASLR offsets as randomization being enabled, we can drop the explicit check for ThunderX as well, given that KASLR is known to be unavailable. Note that we never enable KPTI on these systems, in spite of what this function returns. However, using non-global mappings for code regions is what tickles the erratum on these cores, regardless of whether KPTI is enabled or not, so non-global mappings should simply never be used here. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> --- arch/arm64/kernel/cpufeature.c | 12 ------------ 1 file changed, 12 deletions(-)