From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 173301E2306; Fri, 13 Dec 2024 15:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734104667; cv=none; b=qE6Wj1kSIZuash+mwJdKO0QPjDTfCc4RyYqq/BwZ7CCIl4LE0J/dNYpuWsmizv9lDbMcWo2OVYg/nD3FH9vVsDu0jIr0k5fL7+zc/GN076IEMcg/9H27JU6lkwFkEBY8XUGprBr1rNyopY/686fgKi+GjhEbBnVuoC7qYMwKzlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734104667; c=relaxed/simple; bh=rExA0chOwwATzfuLE+bY7ckxmYYYIvqmCZordD3tONM=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=tqm9+4FPB//npVT5An5KNtFwcv2SDmuFDHH+mdJK+1vuSSOPwmgJTcNFI6171E8ij27Xf+NY4U4KsUzCbN/HEfXnqtQUoO2FQS3psVI6CjR6uW22KAVJ55KnecCRCAoM2aXEt0Ej+y7o2qZstKw9wXle59Qvf2RtMR6v8WNvmjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kIOZk3uO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kIOZk3uO" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.