Re: [PATCH v2 2/3] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-20 Thread Jisheng Zhang
Hi, On Wed, 21 Aug 2019 11:07:39 +0900 Masami Hiramatsu wrote: > > > Hi Jisheng, > > On Tue, 20 Aug 2019 03:53:31 + > Jisheng Zhang wrote: > > > For KPROBES_ON_FTRACE case, we need to adjust the kprobe's addr > > correspondingly. > > Either KPROBES_ON_FTRACE=y or not, ftrace_location(

Re: [PATCH v2 2/3] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-20 Thread Masami Hiramatsu
Hi Jisheng, On Tue, 20 Aug 2019 03:53:31 + Jisheng Zhang wrote: > For KPROBES_ON_FTRACE case, we need to adjust the kprobe's addr > correspondingly. Either KPROBES_ON_FTRACE=y or not, ftrace_location() check must be done correctly. If it failed, kprobes can modify the instruction which can

Re: [PATCH v2 2/3] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-20 Thread Jisheng Zhang
On Tue, 20 Aug 2019 15:45:24 +0530 "Naveen N. Rao" wrote: > > > Jisheng Zhang wrote: > > For KPROBES_ON_FTRACE case, we need to adjust the kprobe's addr > > correspondingly. > > > > Signed-off-by: Jisheng Zhang > > --- > > kernel/kprobes.c | 10 +++--- > > 1 file changed, 7 insertions(+),

Re: [PATCH v2 2/3] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-20 Thread Naveen N. Rao
Jisheng Zhang wrote: For KPROBES_ON_FTRACE case, we need to adjust the kprobe's addr correspondingly. Signed-off-by: Jisheng Zhang --- kernel/kprobes.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 9873fc627d61..3fd2f68

[PATCH v2 2/3] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-19 Thread Jisheng Zhang
For KPROBES_ON_FTRACE case, we need to adjust the kprobe's addr correspondingly. Signed-off-by: Jisheng Zhang --- kernel/kprobes.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 9873fc627d61..3fd2f68644da 100644 --- a/kern