Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-10 Thread Masami Hiramatsu
Hi Peter and Ingo, On Wed, 2 Sep 2020 09:02:26 +0200 pet...@infradead.org wrote: > On Wed, Sep 02, 2020 at 09:37:39AM +0900, Masami Hiramatsu wrote: > > On Tue, 1 Sep 2020 21:08:08 +0200 > > Peter Zijlstra wrote: > > > > > On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu wrote: > > >

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-08 Thread Masami Hiramatsu
On Wed, 9 Sep 2020 00:09:23 +0900 Masami Hiramatsu wrote: > > > Of course make it lockless then warning is gone. > > > But even without the lockless patch, this warning can be false-positive > > > because we prohibit nested kprobe call, right? > > > > Yes, because the actual nesting is avoided

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-08 Thread Masami Hiramatsu
On Tue, 8 Sep 2020 12:37:36 +0200 pet...@infradead.org wrote: > On Thu, Sep 03, 2020 at 10:39:54AM +0900, Masami Hiramatsu wrote: > > > > There's a bug, that might make it miss it. I have a patch. I'll send it > > > shortly. > > > > OK, I've confirmed that the lockdep warns on kretprobe from

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-08 Thread peterz
On Tue, Sep 08, 2020 at 11:15:14AM +, eddy...@trendmicro.com wrote: > > From: pet...@infradead.org > > > > I'm now trying and failing to reproduce I can't seem to make it use > > int3 today. It seems to want to use ftrace or refuses everything. I'm > > probably doing it wrong. > > > >

RE: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-08 Thread eddy...@trendmicro.com
> From: pet...@infradead.org > > I'm now trying and failing to reproduce I can't seem to make it use > int3 today. It seems to want to use ftrace or refuses everything. I'm > probably doing it wrong. > You can turn off CONFIG_KPROBES_ON_FTRACE (and also sysctl debug.kprobes-optimization) to

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-08 Thread peterz
On Thu, Sep 03, 2020 at 10:39:54AM +0900, Masami Hiramatsu wrote: > > There's a bug, that might make it miss it. I have a patch. I'll send it > > shortly. > > OK, I've confirmed that the lockdep warns on kretprobe from INT3 > with your fix. I'm now trying and failing to reproduce I can't

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-07 Thread Masami Hiramatsu
On Mon, 07 Sep 2020 13:44:19 -0400 f...@redhat.com (Frank Ch. Eigler) wrote: > Masami Hiramatsu writes: > > > Sorry, for noticing this point, I Cc'd to systemtap. Is systemtap taking > > care of spinlock too? > > On PRREMPT_RT configurations, systemtap uses the raw_spinlock_t >

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-07 Thread Frank Ch. Eigler
Masami Hiramatsu writes: > Sorry, for noticing this point, I Cc'd to systemtap. Is systemtap taking > care of spinlock too? On PRREMPT_RT configurations, systemtap uses the raw_spinlock_t types/functions, to keep its probe handlers as atomic as we can make them. - FChE

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread Masami Hiramatsu
On Thu, 3 Sep 2020 10:39:54 +0900 Masami Hiramatsu wrote: > OK, I've confirmed that the lockdep warns on kretprobe from INT3 > with your fix. Of course make it lockless then warning is gone. > But even without the lockless patch, this warning can be false-positive > because we prohibit nested

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread Masami Hiramatsu
On Wed, 2 Sep 2020 15:42:52 +0200 pet...@infradead.org wrote: > On Wed, Sep 02, 2020 at 10:19:26PM +0900, Masami Hiramatsu wrote: > > On Wed, 2 Sep 2020 11:36:13 +0200 > > pet...@infradead.org wrote: > > > > > On Wed, Sep 02, 2020 at 05:17:55PM +0900, Masami Hiramatsu wrote: > > > > > > > > Ok,

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread Masami Hiramatsu
On Wed, 2 Sep 2020 11:36:13 +0200 pet...@infradead.org wrote: > On Wed, Sep 02, 2020 at 05:17:55PM +0900, Masami Hiramatsu wrote: > > > > Ok, but then lockdep will yell at you if you have that enabled and run > > > the unoptimized things. > > > > Oh, does it warn for all spinlock things in

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread peterz
On Wed, Sep 02, 2020 at 10:19:26PM +0900, Masami Hiramatsu wrote: > On Wed, 2 Sep 2020 11:36:13 +0200 > pet...@infradead.org wrote: > > > On Wed, Sep 02, 2020 at 05:17:55PM +0900, Masami Hiramatsu wrote: > > > > > > Ok, but then lockdep will yell at you if you have that enabled and run > > > >

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread peterz
On Wed, Sep 02, 2020 at 05:17:55PM +0900, Masami Hiramatsu wrote: > > Ok, but then lockdep will yell at you if you have that enabled and run > > the unoptimized things. > > Oh, does it warn for all spinlock things in kprobes if it is unoptimized? > Hmm, it has to be noted in the documentation.

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread Masami Hiramatsu
On Wed, 2 Sep 2020 09:02:26 +0200 pet...@infradead.org wrote: > On Wed, Sep 02, 2020 at 09:37:39AM +0900, Masami Hiramatsu wrote: > > On Tue, 1 Sep 2020 21:08:08 +0200 > > Peter Zijlstra wrote: > > > > > On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu wrote: > > > > Masami Hiramatsu

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-02 Thread peterz
On Wed, Sep 02, 2020 at 09:37:39AM +0900, Masami Hiramatsu wrote: > On Tue, 1 Sep 2020 21:08:08 +0200 > Peter Zijlstra wrote: > > > On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu wrote: > > > Masami Hiramatsu (16): > > > kprobes: Add generic kretprobe trampoline handler > > >

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-01 Thread Masami Hiramatsu
On Tue, 1 Sep 2020 21:08:08 +0200 Peter Zijlstra wrote: > On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu wrote: > > Masami Hiramatsu (16): > > kprobes: Add generic kretprobe trampoline handler > > x86/kprobes: Use generic kretprobe trampoline handler > > arm:

Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-01 Thread Peter Zijlstra
On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu wrote: > Masami Hiramatsu (16): > kprobes: Add generic kretprobe trampoline handler > x86/kprobes: Use generic kretprobe trampoline handler > arm: kprobes: Use generic kretprobe trampoline handler > arm64: kprobes:

[PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-08-29 Thread Masami Hiramatsu
Hi, Here is the 5th version of the series to unify the kretprobe trampoline handler and to make the kretprobe lockless. Thanks Peter for this work !! Previous version is here; https://lkml.kernel.org/r/159861759775.992023.12553306821235086809.stgit@devnote2 This version merges the