lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250624153314.2Mwvvjmy@linutronix.de>
Date: Tue, 24 Jun 2025 17:33:14 +0200
From: Nam Cao <namcao@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Clément Léger <cleger@...osinc.com>,
	"Maciej W. Rozycki" <macro@...am.me.uk>,
	Palmer Dabbelt <palmer@...belt.com>,
	Paul Walmsley <paul.walmsley@...ive.com>, aou@...s.berkeley.edu,
	Alexandre Ghiti <alex@...ti.fr>, clrkwllms@...nel.org,
	rostedt@...dmis.org, linux-rt-devel@...ts.linux.dev,
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: Enable interrupt during exception handling

On Tue, Jun 24, 2025 at 04:34:58PM +0200, Peter Zijlstra wrote:
> On Tue, Jun 24, 2025 at 04:23:50PM +0200, Sebastian Andrzej Siewior wrote:
> > On 2025-06-24 16:18:01 [+0200], Peter Zijlstra wrote:
> > > I'm confused, sending signals is for exception from userspace. That has
> > > nothing to do with exceptions from kernelspace being NMI like.
> > 
> > Yes. See the original submission
> > 	https://lore.kernel.org/linux-riscv/20250620114346.1740512-1-namcao@linutronix.de/
> 
> I'm still confused, that code is trying to enable IRQs in the
> from-kernel part. That's insane.
> 
> Can some Risc-V person explain why a from-kernel exception would ever
> result in a signal?!?!

Exceptions from kernel do not raise signals. Enabling irqs there is not
necessary, I can remove that part.

But for my curiousity, do you mind elaborating why it is insane to enable
irqs in from-kernel exception handling?

For "NMI-like" exceptions, (I think) I get it, the context would be messed
up. But what about the others, e.g. kernel page faults?

Best regards,
Nam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ