[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250903202803.GQ4067720@noisy.programming.kicks-ass.net>
Date: Wed, 3 Sep 2025 22:28:03 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Alexandre Ghiti <alexghiti@...osinc.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>,
Guo Ren <guoren@...nel.org>,
Björn Töpel <bjorn@...osinc.com>,
Palmer Dabbelt <palmer@...osinc.com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH RFC] riscv: Do not handle break traps from kernel as nmi
On Wed, Sep 03, 2025 at 07:54:29PM +0000, Alexandre Ghiti wrote:
> kprobe has been broken on riscv for quite some time. There is an attempt
> [1] to fix that which actually works. This patch works because it enables
> ARCH_HAVE_NMI_SAFE_CMPXCHG and that makes the ring buffer allocation
> succeed when handling a kprobe because we handle *all* kprobes in nmi
> context. We do so because Peter advised us to treat all kernel traps as
> nmi [2].
>
> But that does not seem right for kprobe handling, so instead, treat
> break traps from kernel as non-nmi.
You can put a kprobe inside: local_irq_disable(), no? Inside any random
spinlock region in fact. How is the probe then not NMI like?
Powered by blists - more mailing lists