Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-22 Thread Seth Jennings
On Tue, Oct 21, 2014 at 09:40:32PM -0500, Josh Poimboeuf wrote: > On Tue, Oct 21, 2014 at 11:25:56PM +0200, Jiri Kosina wrote: > > On Tue, 21 Oct 2014, Josh Poimboeuf wrote: > > > > > > I'm guessing kGraft doesn't have the address + length? I think you > > > could call kallsyms_lookup() to get

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-22 Thread Masami Hiramatsu
(2014/10/22 15:02), Jiri Kosina wrote: > On Wed, 22 Oct 2014, Masami Hiramatsu wrote: > >>> Add a function that allows external users (such as live patching >>> mechanisms) to check whether a given function (identified by symbol name) >>> has a kprobe installed in it. >> >> Actually, we've

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-22 Thread Jiri Kosina
On Wed, 22 Oct 2014, Masami Hiramatsu wrote: > > Add a function that allows external users (such as live patching > > mechanisms) to check whether a given function (identified by symbol name) > > has a kprobe installed in it. > > Actually, we've already exported the list of kprobes with probe

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-22 Thread Jiri Kosina
On Wed, 22 Oct 2014, Masami Hiramatsu wrote: Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Actually, we've already exported the list of kprobes with probe points

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-22 Thread Masami Hiramatsu
(2014/10/22 15:02), Jiri Kosina wrote: On Wed, 22 Oct 2014, Masami Hiramatsu wrote: Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Actually, we've already exported

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-22 Thread Seth Jennings
On Tue, Oct 21, 2014 at 09:40:32PM -0500, Josh Poimboeuf wrote: On Tue, Oct 21, 2014 at 11:25:56PM +0200, Jiri Kosina wrote: On Tue, 21 Oct 2014, Josh Poimboeuf wrote: I'm guessing kGraft doesn't have the address + length? I think you could call kallsyms_lookup() to get both values.

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Josh Poimboeuf
On Tue, Oct 21, 2014 at 11:25:56PM +0200, Jiri Kosina wrote: > On Tue, 21 Oct 2014, Josh Poimboeuf wrote: > > > > This is a rather difficult call actually. I am of course aware of the > > > fact > > > that kernel fucntions can't be uniquely identified by name, but when > > > thinking about

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Masami Hiramatsu
(2014/10/22 0:48), Jiri Kosina wrote: > Add a function that allows external users (such as live patching > mechanisms) to check whether a given function (identified by symbol name) > has a kprobe installed in it. Actually, we've already exported the list of kprobes with probe points (symbols)

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Jiri Kosina
On Tue, 21 Oct 2014, Josh Poimboeuf wrote: > > This is a rather difficult call actually. I am of course aware of the fact > > that kernel fucntions can't be uniquely identified by name, but when > > thinking about this, one has to consider: > > > > - ftrace primary userspace interface

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Josh Poimboeuf
On Tue, Oct 21, 2014 at 10:19:30PM +0200, Jiri Kosina wrote: > On Tue, 21 Oct 2014, Josh Poimboeuf wrote: > > > > Add a function that allows external users (such as live patching > > > mechanisms) to check whether a given function (identified by symbol name) > > > has a kprobe installed in it.

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Jiri Kosina
On Tue, 21 Oct 2014, Josh Poimboeuf wrote: > > Add a function that allows external users (such as live patching > > mechanisms) to check whether a given function (identified by symbol name) > > has a kprobe installed in it. > > Functions aren't uniquely identifiable by name. Perhaps it should

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Josh Poimboeuf
On Tue, Oct 21, 2014 at 05:48:30PM +0200, Jiri Kosina wrote: > Add a function that allows external users (such as live patching > mechanisms) to check whether a given function (identified by symbol name) > has a kprobe installed in it. Functions aren't uniquely identifiable by name. Perhaps it

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Ananth N Mavinakayanahalli
On Tue, Oct 21, 2014 at 05:48:30PM +0200, Jiri Kosina wrote: > kernel/kprobes.c| 28 > 2 files changed, 33 insertions(+) > > diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h > index f7296e5..f760555 100644 > --- a/include/linux/kprobes.h > +++

[PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Jiri Kosina
Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Signed-off-by: Jiri Kosina --- include/linux/kprobes.h | 5 + kernel/kprobes.c| 28

[PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Jiri Kosina
Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Signed-off-by: Jiri Kosina jkos...@suse.cz --- include/linux/kprobes.h | 5 + kernel/kprobes.c| 28

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Ananth N Mavinakayanahalli
On Tue, Oct 21, 2014 at 05:48:30PM +0200, Jiri Kosina wrote: kernel/kprobes.c| 28 2 files changed, 33 insertions(+) diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index f7296e5..f760555 100644 --- a/include/linux/kprobes.h +++

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Josh Poimboeuf
On Tue, Oct 21, 2014 at 05:48:30PM +0200, Jiri Kosina wrote: Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Functions aren't uniquely identifiable by name. Perhaps it

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Jiri Kosina
On Tue, 21 Oct 2014, Josh Poimboeuf wrote: Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Functions aren't uniquely identifiable by name. Perhaps it should be

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Josh Poimboeuf
On Tue, Oct 21, 2014 at 10:19:30PM +0200, Jiri Kosina wrote: On Tue, 21 Oct 2014, Josh Poimboeuf wrote: Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it.

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Jiri Kosina
On Tue, 21 Oct 2014, Josh Poimboeuf wrote: This is a rather difficult call actually. I am of course aware of the fact that kernel fucntions can't be uniquely identified by name, but when thinking about this, one has to consider: - ftrace primary userspace interface

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Masami Hiramatsu
(2014/10/22 0:48), Jiri Kosina wrote: Add a function that allows external users (such as live patching mechanisms) to check whether a given function (identified by symbol name) has a kprobe installed in it. Actually, we've already exported the list of kprobes with probe points (symbols) via

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Josh Poimboeuf
On Tue, Oct 21, 2014 at 11:25:56PM +0200, Jiri Kosina wrote: On Tue, 21 Oct 2014, Josh Poimboeuf wrote: This is a rather difficult call actually. I am of course aware of the fact that kernel fucntions can't be uniquely identified by name, but when thinking about this, one has to