From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 3A43EC369BD for ; Wed, 16 Apr 2025 12:54:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vkVcAkL0jfCqz4MB1e4TIQlmouXerzQimxuIDbZ5j68=; b=LSZ3xAk2v5gDivHvTV9UsGuYbA NTiVLGWMCHd+B0QPmphjD/WWCMjlpkDhepYI927ohd92W2o+4s6yU0Lc3n9UdL96SZBOzLPSawhkF kauDUtQvxS25g7i0s2mlfZOyr0b4pLz+hNsx4RULihRfaN9D7+6y/UiH2pYFZ/0haiznE1il45ogS ZngohsAcArxalj5li0PKgLjYTjXQogWEKpQGzJNufo0Ad6I2AnTQh6CvW+NK2+h7/KE8Kysi3WIlk G7cXgQyKlER/wXRehziJNgorJkWUbkNXY4Fgy/1E41IEiFt/pJYmS5AnkDvEdJWuTaoerX9yIGHqi GCXZdmHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u52HF-00000009aA4-3IaU; Wed, 16 Apr 2025 12:54:05 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u52FQ-00000009Zzh-19nR for linux-arm-kernel@lists.infradead.org; Wed, 16 Apr 2025 12:52:12 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id ECE3961135; Wed, 16 Apr 2025 12:51:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25A42C4CEE2; Wed, 16 Apr 2025 12:52:09 +0000 (UTC) Date: Wed, 16 Apr 2025 13:52:07 +0100 From: Catalin Marinas To: Marc Zyngier Subject: Re: [PATCH] arm64: Remove checks for broken Cavium HW from the PI code Message-ID: References: <20250416123534.1108220-1-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250416123534.1108220-1-maz@kernel.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oliver Upton , Shameer Kolothum , kvmarm@lists.linux.dev, Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 16, 2025 at 01:35:34PM +0100, Marc Zyngier wrote: > Calling into the MIDR checking framework from the PI code has recently > become much harder, due to the new fancy "multi-MIDR" support that > relies on tables being populated at boot time, but not that early that > they are available to the PI code. There are additional issues with > this framework, as the code really isn't position independend *at all*. > > This leads to some ugly breakages, as reported by Ada. > > It so appears that the only reason for the PI code to call into the > MIDR checking code is to cope with The Most Broken ARM64 System Ever, > aka Cavium ThunderX, which cannot deal with nG attributes that result > of the combination of KASLR and KPTI as a consequence of Erratum 27456. > > Rather than adding extra complexity for something that is actually > a very dead horse, let's simply drop that check. On my own machine, > the firmware doesn't provide a KASLR seed, preventing the pathological > case to show up. > > And if someone does have a broken box that passes a seed to the kernel, > "nokaslr" on the command-line is an easy enough workaround. > > Fixes: c8c2647e69bed ("arm64: Make  _midr_in_range_list() an exported function") > Reported-by: Ada Couprie Diaz > Signed-off-by: Marc Zyngier > Link: https://lore.kernel.org/r/3d97e45a-23cf-419b-9b6f-140b4d88de7b@arm.com > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Shameer Kolothum > Cc: Oliver Upton Acked-by: Catalin Marinas The fixed commit went in via the KVM tree. Oliver, Marc, let me know if you'd like me to take this as a fix via the arm64 tree (either way is fine by me). Thanks. -- Catalin