Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-21 Thread Greg Kroah-Hartman
On Fri, Oct 20, 2017 at 09:28:33AM -0700, Kees Cook wrote: > On Fri, Oct 20, 2017 at 8:17 AM, Ingo Molnar wrote: > > > > * Kees Cook wrote: > > > >> On Fri, Oct 20, 2017 at 5:22 AM, Ingo Molnar wrote: > >> > > >> > Ok, could we now also fix these: > >> > > >> > net/dccp/probe.c:166:2: warning: ‘

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-20 Thread Kees Cook
On Fri, Oct 20, 2017 at 8:17 AM, Ingo Molnar wrote: > > * Kees Cook wrote: > >> On Fri, Oct 20, 2017 at 5:22 AM, Ingo Molnar wrote: >> > >> > Ok, could we now also fix these: >> > >> > net/dccp/probe.c:166:2: warning: ‘register_jprobe’ is deprecated >> > [-Wdeprecated-declarations] >> > net/dcc

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-20 Thread Ingo Molnar
* Kees Cook wrote: > On Fri, Oct 20, 2017 at 5:22 AM, Ingo Molnar wrote: > > > > Ok, could we now also fix these: > > > > net/dccp/probe.c:166:2: warning: ‘register_jprobe’ is deprecated > > [-Wdeprecated-declarations] > > net/dccp/probe.c:170:4: warning: ‘register_jprobe’ is deprecated > > [

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-20 Thread Kees Cook
On Fri, Oct 20, 2017 at 5:22 AM, Ingo Molnar wrote: > > Ok, could we now also fix these: > > net/dccp/probe.c:166:2: warning: ‘register_jprobe’ is deprecated > [-Wdeprecated-declarations] > net/dccp/probe.c:170:4: warning: ‘register_jprobe’ is deprecated > [-Wdeprecated-declarations] > net/dccp/

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-20 Thread Ingo Molnar
Ok, could we now also fix these: net/dccp/probe.c:166:2: warning: ‘register_jprobe’ is deprecated [-Wdeprecated-declarations] net/dccp/probe.c:170:4: warning: ‘register_jprobe’ is deprecated [-Wdeprecated-declarations] net/dccp/probe.c:190:2: warning: ‘unregister_jprobe’ is deprecated [-Wdepre

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-10 Thread Steven Rostedt
On Mon, 9 Oct 2017 09:33:50 -0600 Jonathan Corbet wrote: > > Using ftrace to hook to functions > > = > > > > Copyright 2017 VMware Inc. > >Author: Steven Rostedt > > License: The GNU Free Documentation License, Version 1.2 > >

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Steven Rostedt
On Mon, 9 Oct 2017 09:33:50 -0600 Jonathan Corbet wrote: > > will prevent the callback from being called again. But this wrapper > > adds some overhead, and if the callback is safe from recursion, > > it can set this flag to disable the ftrace protection. > > What happens if

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Steven Rostedt
On Sat, 7 Oct 2017 18:35:40 +0900 Masami Hiramatsu wrote: > > The ftrace context > > == > > > > WARNING: The ability to add a callback to almost any function within the > > kernel comes with risks. A callback can be called from any context > > (normal, softirq, irq, and NMI). Ca

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Steven Rostedt
On Sat, 7 Oct 2017 14:24:53 +0900 Stafford Horne wrote: > Hello, > > Nice read, see some comments below Thanks. > > To enable tracing call: > > > > register_ftrace_function(&ops); > > Maybe it would help to have a small section on 'The register function' > below to answer? > > Is it po

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Steven Rostedt
On Sat, 7 Oct 2017 10:55:00 +0200 Ingo Molnar wrote: > So the text first starts talking about 'hooks' then uses the 'callback' > terminology in the rest of th document. Could we please change it all to > 'callback'? > > [ This is a pet peeve of mine as 'hook' gives me the cringe! ;-) ] > Wil

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Steven Rostedt
On Mon, 9 Oct 2017 10:33:17 -0600 Jonathan Corbet wrote: > On Mon, 9 Oct 2017 12:20:35 -0400 > Steven Rostedt wrote: > > > > > SAVE_REGS_IF_SUPPORTED - Similar to SAVE_REGS but the registering of a > > > > ftrace_ops on an architecture that does not support passing of > > > > regs > > >

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Jonathan Corbet
On Mon, 9 Oct 2017 12:20:35 -0400 Steven Rostedt wrote: > > > SAVE_REGS_IF_SUPPORTED - Similar to SAVE_REGS but the registering of a > > > ftrace_ops on an architecture that does not support passing of regs > > > will not fail with this flag set. But the callback must check if > > >

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Steven Rostedt
On Mon, 9 Oct 2017 09:33:50 -0600 Jonathan Corbet wrote: > On Fri, 6 Oct 2017 11:34:30 -0400 > Steven Rostedt wrote: > > > On Fri, 6 Oct 2017 13:49:59 +0900 > > Masami Hiramatsu wrote: > > > > > Steve, could you write a documentation how to use ftrace callback? > > > I think I should update

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-09 Thread Jonathan Corbet
On Fri, 6 Oct 2017 11:34:30 -0400 Steven Rostedt wrote: > On Fri, 6 Oct 2017 13:49:59 +0900 > Masami Hiramatsu wrote: > > > Steve, could you write a documentation how to use ftrace callback? > > I think I should update the Documentation/kprobes.txt so that jprobe > > user can easily migrate on

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-07 Thread Masami Hiramatsu
On Fri, 6 Oct 2017 11:34:30 -0400 Steven Rostedt wrote: > On Fri, 6 Oct 2017 13:49:59 +0900 > Masami Hiramatsu wrote: > > > Steve, could you write a documentation how to use ftrace callback? > > I think I should update the Documentation/kprobes.txt so that jprobe > > user can easily migrate on

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-07 Thread Ingo Molnar
* Steven Rostedt wrote: > On Fri, 6 Oct 2017 13:49:59 +0900 > Masami Hiramatsu wrote: > > > Steve, could you write a documentation how to use ftrace callback? > > I think I should update the Documentation/kprobes.txt so that jprobe > > user can easily migrate on that. > > I decided to do this

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-06 Thread Stafford Horne
Hello, Nice read, see some comments below On Fri, Oct 06, 2017 at 11:34:30AM -0400, Steven Rostedt wrote: > On Fri, 6 Oct 2017 13:49:59 +0900 > Masami Hiramatsu wrote: > > > Steve, could you write a documentation how to use ftrace callback? > > I think I should update the Documentation/kprobes.

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-06 Thread Steven Rostedt
On Fri, 6 Oct 2017 13:49:59 +0900 Masami Hiramatsu wrote: > Steve, could you write a documentation how to use ftrace callback? > I think I should update the Documentation/kprobes.txt so that jprobe > user can easily migrate on that. I decided to do this now. Here's a first draft. What do you thi

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-06 Thread Steven Rostedt
On Fri, 6 Oct 2017 13:49:59 +0900 Masami Hiramatsu wrote: > Steve, could you write a documentation how to use ftrace callback? > I think I should update the Documentation/kprobes.txt so that jprobe > user can easily migrate on that. Sure, I'll add that to my todo list. -- Steve

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Masami Hiramatsu
On Thu, 5 Oct 2017 19:58:08 -0400 Steven Rostedt wrote: > On Thu, 5 Oct 2017 16:35:22 -0700 > Kees Cook wrote: > > > > As far as I can see, tcp probe, dccp probe, sctp probe and lkdtm > > > are using jprobe to probe function. Please consider to migrate. > > > > I'm happy to do so, but I'm qu

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Masami Hiramatsu
On Thu, 5 Oct 2017 21:11:30 -0400 Steven Rostedt wrote: > On Fri, 6 Oct 2017 09:32:52 +0900 > Masami Hiramatsu wrote: > > > I think using ftrace gives you lower latency, but you need to depend on > > CONFIG_FUNCTION_TRACER instead of CONFIG_KPROBES. > > Which shouldn't be an issue, since all d

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Steven Rostedt
On Fri, 6 Oct 2017 09:32:52 +0900 Masami Hiramatsu wrote: > I think using ftrace gives you lower latency, but you need to depend on > CONFIG_FUNCTION_TRACER instead of CONFIG_KPROBES. Which shouldn't be an issue, since all distros now have that enabled. -- Steve

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Masami Hiramatsu
On Thu, 5 Oct 2017 16:35:22 -0700 Kees Cook wrote: > On Thu, Oct 5, 2017 at 4:13 PM, Masami Hiramatsu wrote: > > Hi, > > > > This series abolishes jprobe APIs and remove or disable related > > code. This is a preparation of removing all jprobe code (including > > kprobe's break_handler.) > > I'm

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 4:58 PM, Steven Rostedt wrote: > On Thu, 5 Oct 2017 16:35:22 -0700 > Kees Cook wrote: > >> > As far as I can see, tcp probe, dccp probe, sctp probe and lkdtm >> > are using jprobe to probe function. Please consider to migrate. >> >> I'm happy to do so, but I'm quite unfamil

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Steven Rostedt
On Thu, 5 Oct 2017 16:35:22 -0700 Kees Cook wrote: > > As far as I can see, tcp probe, dccp probe, sctp probe and lkdtm > > are using jprobe to probe function. Please consider to migrate. > > I'm happy to do so, but I'm quite unfamiliar with how to do this (I > didn't write lkdtm's jprobe code

Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 4:13 PM, Masami Hiramatsu wrote: > Hi, > > This series abolishes jprobe APIs and remove or disable related > code. This is a preparation of removing all jprobe code (including > kprobe's break_handler.) > I'm not so sure how many jprobe users still exists, but > please migra