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 73A7DE7717D for ; Fri, 13 Dec 2024 15:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/16pDKoygj0Bt3ju6/GIULYY438lE6WCczprZ4VE2UQ=; b=ub6A/ijaezlnzo2TfF2Xfw5qj5 nGsL7lGn7sxIBNcCmitAj0MdP729vuNYAry6yFrwxlKJcNOUa56OlFC63eAycL1ZlMglHENLazcot 94S7LrDTFxXXZzxDax4LbQYKn1C7JIN7NqwrSCiUV4M9bAOhBe+58FRNUs2+tAtVMjMXuzVB0/oCH xVbqiQ7xDvcn5NhMCNULEe5ki/OOk0eJaVvksAhLLsEtv+6z/w9aqWzrMm8EVvAtWTk+/skvCYFUS +hgyJpP2+idLiZcLGBEBeZSpjHP+v2w93LNV0wzDnx4QeXyDa2gTHkxYxF/rau318YYCBniaEgBpv /4KYPWFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tM7rw-00000004JVB-2jNI; Fri, 13 Dec 2024 15:46:20 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tM7q7-00000004J61-2tsw for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2024 15:44:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id AED13A42C16; Fri, 13 Dec 2024 15:42:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 861C3C4CED0; Fri, 13 Dec 2024 15:44:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734104666; bh=rExA0chOwwATzfuLE+bY7ckxmYYYIvqmCZordD3tONM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kIOZk3uOZDLxd9HZJ6Tqo6u7L20VGm+WXAraiQ9UrSfpy7D5ZZHwr4cHBNEiG9YSg 8KSGnr6UA5WXmQ7CWEpD4zKbLQOv4YVDk53qCSLR6nl24b5WHBV6UX5jdOmbQralGO fWbjDoEadvbaadmbgIc5XJ2sXE0DmAGW3JBH1CvUHUjdcUIIU+xloaMMjAmSCnSP6g mUNoAXothw5mYbJRSO70wuSTaEYnHduPrAQeXl/4XS1sIhUKnV2YuPT/4GCmuFilti jn4B+O7EwKeR9oo+fGx8cpUlKFLpQRXv2v74PS42DY66th8QRCaScUh1jksmcETe9t ky584VlkNbGYg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tM7q4-003UN7-3W; Fri, 13 Dec 2024 15:44:24 +0000 Date: Fri, 13 Dec 2024 15:44:23 +0000 Message-ID: <86ed2bsi3s.wl-maz@kernel.org> From: Marc Zyngier To: wens@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , Thomas Gleixner , Mark Kettenis , Chen-Yu Tsai , stable@vger.kernel.org Subject: Re: [PATCH] irqchip/gic-v3: Work around insecure GIC integrations In-Reply-To: References: <20241213141037.3995049-1-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wens@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, tglx@linutronix.de, mark.kettenis@xs4all.nl, wenst@chromium.org, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241213_074427_864774_631FF9DF X-CRM114-Status: GOOD ( 25.41 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 13 Dec 2024 15:10:11 +0000, Chen-Yu Tsai wrote: >=20 > On Fri, Dec 13, 2024 at 10:34=E2=80=AFPM Marc Zyngier wr= ote: > > > > It appears that the relatively popular RK3399 SoC has been put together > > using a large amount of illicit substances, as experiments reveal > > that its integration of GIC500 exposes the *secure* programming > > interface to non-secure. > > > > This has some pretty bad effects on the way priorities are handled, > > and results in a dead machine if booting with pseudo-NMI enabled > > (irqchip.gicv3_pseudo_nmi=3D1) if the kernel contains 18fdb6348c480 > > ("arm64: irqchip/gic-v3: Select priorities at boot time"), which > > relies on the priorities being programmed using the NS view. > > > > Let's restore some sanity by going one step further and disable > > security altogether in this case. This is not any worse, and > > puts us in a mode where priorities actually make some sense. > > > > Huge thanks to Mark Kettenis who initially identified this issue > > on OpenBSD, and to Chen-Yu Tsai who reported the problem in > > Linux. > > > > Fixes: 18fdb6348c480 ("arm64: irqchip/gic-v3: Select priorities at boot= time") > > Reported-by: Mark Kettenis > > Reported-by: Chen-Yu Tsai >=20 > Should be >=20 > Reported-by: Chen-Yu Tsai >=20 > (I know it's confusing, I even mix up inboxes at work.) Ah, fair enough. Given that the report was on IRC, I had just used the first address git log gave me. > > Signed-off-by: Marc Zyngier > > Cc: stable@vger.kernel.org >=20 > Tested-by: Chen-Yu Tsai >=20 > My RK3399 boots normally with pseudo NMI enabled with this patch now. > Also tried NMI backtraces through sysrq, though I'm not sure that > always goes through the pseudo NMI path? Should do, according to arch/arm64/kernel/smp::ipi_setup(). Thanks for having tested it. M. --=20 Without deviation from the norm, progress is not possible.