[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200826090102.GC1362448@hirez.programming.kicks-ass.net>
Date: Wed, 26 Aug 2020 11:01:02 +0200
From: peterz@...radead.org
To: "Eddy_Wu@...ndmicro.com" <Eddy_Wu@...ndmicro.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: x86/kprobes: kretprobe fails to triggered if kprobe at function
entry is not optimized (trigger by int3 breakpoint)
On Wed, Aug 26, 2020 at 07:07:09AM +0000, Eddy_Wu@...ndmicro.com wrote:
> llist operations require atomic cmpxchg, for some arch doesn't have
> CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG, in_nmi() check might still needed.
> (HAVE_KRETPROBES && !CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG): arc, arm,
> csky, mips
>
Look at the MIPS NMI handler, it's brilliant ;-)
Anyway, I think that CONFIG could use a little help, the point was to
opt-in to some code, and it was supposed to leave out known broken
architectures.
If your architecture has NMIs (not all of them do) or SMP, and doesn't
have sane atomic ops (CAS or LL/SC), then it's broken crap and I don't
care about it, full stop.
Those architectures are known broken and limp along on pure luck, that
CONFIG flag lets them disable some code that makes them crash faster.
The same with non-coherent SMP, some archs tried to limp along, nobody
cared about them, and I think we've since deleted them. I long for the
day we get to delete the last of these broken atomic archs.
Known broken archs include: Sparc32-SMP, PARISC, ARC-v1-SMP.
There might be a few more, but I've forgotten.
Powered by blists - more mailing lists