Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > > > I am

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" wrote: > > > > > I am posting the powerpc bits in the same thread so as

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > On Fri, 17 Feb 2017 17:42:54 -0300 > Arnaldo Carvalho de Melo <a...@kernel.org> wrote: > > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > > On Thu, 16 Feb 2017 13:47:37 +0530 &

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > On Fri, 17 Feb 2017 17:42:54 -0300 > Arnaldo Carvalho de Melo wrote: > > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > > On Thu, 16 Feb 2017 13:47:37 +0530 > > > "Naveen N. Ra

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > > > I am

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" wrote: > > > > > I am posting the powerpc bits in the same thread so as

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 04:11PM, Masami Hiramatsu wrote: > Hi Naveen, > > On Wed, 15 Feb 2017 00:28:34 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > diff --git a/arch/powerpc/kernel/optprobes.c > > b/arch/powerpc/kernel/optprobes.c

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 04:11PM, Masami Hiramatsu wrote: > Hi Naveen, > > On Wed, 15 Feb 2017 00:28:34 +0530 > "Naveen N. Rao" wrote: > > > diff --git a/arch/powerpc/kernel/optprobes.c > > b/arch/powerpc/kernel/optprobes.c > > index e51a045f3d3b..a8f414

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 09:58AM, Ananth N Mavinakayanahalli wrote: > On Wed, Feb 15, 2017 at 12:28:34AM +0530, Naveen N. Rao wrote: > > Allow kprobes to be placed on ftrace _mcount() call sites. This > > optimization avoids the use of a trap, by riding on ftrace > > infrastructure.

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 09:58AM, Ananth N Mavinakayanahalli wrote: > On Wed, Feb 15, 2017 at 12:28:34AM +0530, Naveen N. Rao wrote: > > Allow kprobes to be placed on ftrace _mcount() call sites. This > > optimization avoids the use of a trap, by riding on ftrace > > infrastructure.

[PATCH 3/5] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-16 Thread Naveen N. Rao
ine+0x0[OPTIMIZED] Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 4 ++-- include/linux/kprobes.h | 2 +- kernel/kprobes.c | 7 --- 3 files chang

[PATCH 5/5] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-16 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Signed-off-by: Naveen

[PATCH 3/5] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-16 Thread Naveen N. Rao
ine+0x0[OPTIMIZED] Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 4 ++-- include/linux/kprobes.h | 2 +- kernel/kprobes.c | 7 --- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/kprob

[PATCH 5/5] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-16 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel

[PATCH 4/5] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-16 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kp

[PATCH 4/5] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-16 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 52 ++- 1 file changed

[PATCH 2/5] kprobes: convert kprobe_lookup_name() to a function

2017-02-16 Thread Naveen N. Rao
The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-by: Naveen N. Rao <naveen.n@linux.vne

[PATCH 1/5] powerpc: introduce a new helper to obtain function entry points

2017-02-16 Thread Naveen N. Rao
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch for KPROBES_ON_FTRACE). For looking up function entry points, introduce a separate helper and use the same in optprobes.c Signed-off-by: Naveen N. Rao <navee

[PATCH 2/5] kprobes: convert kprobe_lookup_name() to a function

2017-02-16 Thread Naveen N. Rao
The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/kprobes.h | 53

[PATCH 1/5] powerpc: introduce a new helper to obtain function entry points

2017-02-16 Thread Naveen N. Rao
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch for KPROBES_ON_FTRACE). For looking up function entry points, introduce a separate helper and use the same in optprobes.c Signed-off-by: Naveen N. Rao --- arch

[PATCH 0/2] powerpc: kretprobe updates

2017-02-16 Thread Naveen N. Rao
I am posting the powerpc bits in the same thread so as to keep these changes together. I am not sure how this should be taken upstream as there are atleast three different trees involved: one for the core kprobes infrastructure, one for powerpc and one for perf. Thanks, Naveen Naveen N. Rao (2

[PATCH 2/2] perf: powerpc: choose LEP with kretprobes

2017-02-16 Thread Naveen N. Rao
perf now uses an offset from _text/_stext for kretprobes, rather than the actual function name. As such, let's choose the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/arch/powerpc/util/sym-handling

[PATCH 1/2] powerpc: kretprobes: override default function entry offset

2017-02-16 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/

[PATCH 0/2] powerpc: kretprobe updates

2017-02-16 Thread Naveen N. Rao
I am posting the powerpc bits in the same thread so as to keep these changes together. I am not sure how this should be taken upstream as there are atleast three different trees involved: one for the core kprobes infrastructure, one for powerpc and one for perf. Thanks, Naveen Naveen N. Rao (2

[PATCH 2/2] perf: powerpc: choose LEP with kretprobes

2017-02-16 Thread Naveen N. Rao
perf now uses an offset from _text/_stext for kretprobes, rather than the actual function name. As such, let's choose the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 5 + 1 file changed, 1 insertion

[PATCH 1/2] powerpc: kretprobes: override default function entry offset

2017-02-16 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index fce05a38851c

Re: [PATCH 1/3] kretprobes: ensure probe location is at function entry

2017-02-15 Thread Naveen N. Rao
On 2017/02/16 08:39AM, Masami Hiramatsu wrote: > On Wed, 15 Feb 2017 23:47:52 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > kretprobes can be registered by specifying an absolute address or by > > specifying offset to a symbol.

Re: [PATCH 1/3] kretprobes: ensure probe location is at function entry

2017-02-15 Thread Naveen N. Rao
On 2017/02/16 08:39AM, Masami Hiramatsu wrote: > On Wed, 15 Feb 2017 23:47:52 +0530 > "Naveen N. Rao" wrote: > > > kretprobes can be registered by specifying an absolute address or by > > specifying offset to a symbol. However, we need to ensure this falls at >

[PATCH 1/3] kretprobes: ensure probe location is at function entry

2017-02-15 Thread Naveen N. Rao
from a function entry, as determined through a kallsyms_lookup(). Introduce arch_function_offset_within_entry() as a way for architectures to override this. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- powerpc64 ABIv2 will need to use the over-ride as we want to use the

[PATCH 1/3] kretprobes: ensure probe location is at function entry

2017-02-15 Thread Naveen N. Rao
from a function entry, as determined through a kallsyms_lookup(). Introduce arch_function_offset_within_entry() as a way for architectures to override this. Signed-off-by: Naveen N. Rao --- powerpc64 ABIv2 will need to use the over-ride as we want to use the local entry point which

[PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes"

2017-02-15 Thread Naveen N. Rao
e the same scheme we use for kprobes: offset'ing from _text/_stext. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/pro

[PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes"

2017-02-15 Thread Naveen N. Rao
e the same scheme we use for kprobes: offset'ing from _text/_stext. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 6a6f44dd594b..fa7f81af1

[PATCH 2/3] trace/kprobes: allow return probes with offsets and absolute addresses

2017-02-15 Thread Naveen N. Rao
with kretprobes. Allow its use with the trace infrastructure. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- kernel/trace/trace_kprobe.c | 8 1 file changed, 8 deletions(-) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 7ad9e5

[PATCH 2/3] trace/kprobes: allow return probes with offsets and absolute addresses

2017-02-15 Thread Naveen N. Rao
with kretprobes. Allow its use with the trace infrastructure. Signed-off-by: Naveen N. Rao --- kernel/trace/trace_kprobe.c | 8 1 file changed, 8 deletions(-) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 7ad9e53ad174..2768cb60ebd7 100644 --- a/kernel

Re: [PATCH 1/3] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-15 Thread Naveen N. Rao
On 2017/02/16 12:17AM, Masami Hiramatsu wrote: > On Tue, 14 Feb 2017 14:08:01 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > commit 239aeba76409 ("perf powerpc: Fix kprobe and kretprobe handling > > with kallsyms on ppc64le"

Re: [PATCH 1/3] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-15 Thread Naveen N. Rao
On 2017/02/16 12:17AM, Masami Hiramatsu wrote: > On Tue, 14 Feb 2017 14:08:01 +0530 > "Naveen N. Rao" wrote: > > > commit 239aeba76409 ("perf powerpc: Fix kprobe and kretprobe handling > > with kallsyms on ppc64le") changed how we use the offset fiel

Re: [PATCH] kretprobes: reject registration if a symbol offset is specified

2017-02-15 Thread Naveen N. Rao
Hi Masami, On 2017/02/14 07:32PM, Masami Hiramatsu wrote: > On Tue, 14 Feb 2017 14:01:18 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > Users shouldn't be able to specify an offset with kretprobes, as we always > > want to probe a

Re: [PATCH] kretprobes: reject registration if a symbol offset is specified

2017-02-15 Thread Naveen N. Rao
Hi Masami, On 2017/02/14 07:32PM, Masami Hiramatsu wrote: > On Tue, 14 Feb 2017 14:01:18 +0530 > "Naveen N. Rao" wrote: > > > Users shouldn't be able to specify an offset with kretprobes, as we always > > want to probe at function entry. Otherwise, we won't be

[PATCH 2/3] powerpc: introduce a new helper to obtain function entry points

2017-02-14 Thread Naveen N. Rao
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch). For looking up function entry points, introduce a separate helper and use the same in optprobes.c Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.

[PATCH 2/3] powerpc: introduce a new helper to obtain function entry points

2017-02-14 Thread Naveen N. Rao
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch). For looking up function entry points, introduce a separate helper and use the same in optprobes.c Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/code

[PATCH 3/3] powerpc: kprobes: prefer ftrace when probing function entry

2017-02-14 Thread Naveen N. Rao
k kretprobe_trampoline+0x0[OPTIMIZED] and after patch: # cat ../kprobes/list c00d074c k _do_fork+0xc[DISABLED][FTRACE] c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/in

[PATCH 3/3] powerpc: kprobes: prefer ftrace when probing function entry

2017-02-14 Thread Naveen N. Rao
k kretprobe_trampoline+0x0[OPTIMIZED] and after patch: # cat ../kprobes/list c00d074c k _do_fork+0xc[DISABLED][FTRACE] c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/kprobes.h |

[PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-14 Thread Naveen N. Rao
on the x86 code by Masami. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h | 10 arch/powerpc/kernel/Makefile | 3 ++ arch/powerpc/kernel/kprobes-ftrace.c

[PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-14 Thread Naveen N. Rao
on the x86 code by Masami. Signed-off-by: Naveen N. Rao --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h | 10 arch/powerpc/kernel/Makefile | 3 ++ arch/powerpc/kernel/kprobes-ftrace.c | 100 +++ arch/powerpc

Re: [PATCH v2 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Naveen N. Rao
On 2017/02/14 01:32PM, Ravi Bangoria wrote: > emulate_step() uses a number of underlying kernel functions that were > initially not enabled for LE. This has been rectified since. So, fix > emulate_step() for LE for the corresponding instructions. > > Reported-by: Anton Blanchard

Re: [PATCH v2 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Naveen N. Rao
On 2017/02/14 01:32PM, Ravi Bangoria wrote: > emulate_step() uses a number of underlying kernel functions that were > initially not enabled for LE. This has been rectified since. So, fix > emulate_step() for LE for the corresponding instructions. > > Reported-by: Anton Blanchard > Signed-off-by:

[PATCH 1/3] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-14 Thread Naveen N. Rao
00d0758 k _do_fork+0x18[DISABLED] c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] and after: # cat ../kprobes/list c00d04c8 k _do_fork+0x8[DISABLED] c00d04d0 k _do_fork+0x10[DISABLED] c00412b0 k kretprobe_trampoline+0

[PATCH 1/3] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-14 Thread Naveen N. Rao
00d0758 k _do_fork+0x18[DISABLED] c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] and after: # cat ../kprobes/list c00d04c8 k _do_fork+0x8[DISABLED] c00d04d0 k _do_fork+0x10[DISABLED] c00412b0 k kretprobe_trampoline+0

[PATCH 3/3] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-14 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kpr

[PATCH 3/3] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-14 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 - 1 file changed, 8

[PATCH 2/3] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-14 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 52 ++- 1 file chang

[PATCH 2/3] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-14 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 52 ++- 1 file changed, 31 insertions(+), 21 deletions

[PATCH] kretprobes: reject registration if a symbol offset is specified

2017-02-14 Thread Naveen N. Rao
And dmesg: [48253.757629] register_kretprobe failed, returned -22 Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- kernel/kprobes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 60a702a05684..83ad7e440417

[PATCH] kretprobes: reject registration if a symbol offset is specified

2017-02-14 Thread Naveen N. Rao
And dmesg: [48253.757629] register_kretprobe failed, returned -22 Signed-off-by: Naveen N. Rao --- kernel/kprobes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 60a702a05684..83ad7e440417 100644 --- a/kernel/kprobes.c +++ b/kernel

Re: [PATCH 1/3] kprobes: introduce weak variant of kprobe_exceptions_notify

2017-02-13 Thread Naveen N. Rao
On 2017/02/10 02:41PM, Michael Ellerman wrote: > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> writes: > > > kprobe_exceptions_notify() is not used on some of the architectures such > > as arm[64] and powerpc anymore. Introduce a weak variant for such > &

Re: [PATCH 1/3] kprobes: introduce weak variant of kprobe_exceptions_notify

2017-02-13 Thread Naveen N. Rao
On 2017/02/10 02:41PM, Michael Ellerman wrote: > "Naveen N. Rao" writes: > > > kprobe_exceptions_notify() is not used on some of the architectures such > > as arm[64] and powerpc anymore. Introduce a weak variant for such > > architectures. > > I'l

[PATCH 1/3] kprobes: introduce weak variant of kprobe_exceptions_notify

2017-02-07 Thread Naveen N. Rao
kprobe_exceptions_notify() is not used on some of the architectures such as arm[64] and powerpc anymore. Introduce a weak variant for such architectures. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- kernel/kprobes.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH 3/3] powerpc: kprobes: remove kprobe_exceptions_notify()

2017-02-07 Thread Naveen N. Rao
... as the weak variant will do. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 45e4f82b230d..fce05a38851c

[PATCH 1/3] kprobes: introduce weak variant of kprobe_exceptions_notify

2017-02-07 Thread Naveen N. Rao
kprobe_exceptions_notify() is not used on some of the architectures such as arm[64] and powerpc anymore. Introduce a weak variant for such architectures. Signed-off-by: Naveen N. Rao --- kernel/kprobes.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/kprobes.c b/kernel

[PATCH 3/3] powerpc: kprobes: remove kprobe_exceptions_notify()

2017-02-07 Thread Naveen N. Rao
... as the weak variant will do. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 45e4f82b230d..fce05a38851c 100644 --- a/arch/powerpc/kernel/kprobes.c

[PATCH 2/3] arm: kprobes: remove kprobe_exceptions_notify

2017-02-07 Thread Naveen N. Rao
... as the weak variant will do. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/arm/probes/kprobes/core.c | 10 -- arch/arm64/kernel/probes/kprobes.c | 6 -- 2 files changed, 16 deletions(-) diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/

[PATCH 2/3] arm: kprobes: remove kprobe_exceptions_notify

2017-02-07 Thread Naveen N. Rao
... as the weak variant will do. Signed-off-by: Naveen N. Rao --- arch/arm/probes/kprobes/core.c | 10 -- arch/arm64/kernel/probes/kprobes.c | 6 -- 2 files changed, 16 deletions(-) diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index a4ec240ee7ba

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-02-06 Thread Naveen N. Rao
On 2017/02/07 10:05AM, Masami Hiramatsu wrote: > On Sat, 4 Feb 2017 01:09:49 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > Hi Michael, > > Thanks for the review! I'll defer to Anju on most of the aspects, but... > > > &

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-02-06 Thread Naveen N. Rao
On 2017/02/07 10:05AM, Masami Hiramatsu wrote: > On Sat, 4 Feb 2017 01:09:49 +0530 > "Naveen N. Rao" wrote: > > > Hi Michael, > > Thanks for the review! I'll defer to Anju on most of the aspects, but... > > > > On 2017/02/01 09:53PM, Michael El

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-02-03 Thread Naveen N. Rao
Hi Michael, Thanks for the review! I'll defer to Anju on most of the aspects, but... On 2017/02/01 09:53PM, Michael Ellerman wrote: > Anju T Sudhakar writes: > > > +static void optimized_callback(struct optimized_kprobe *op, > > + struct pt_regs

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-02-03 Thread Naveen N. Rao
Hi Michael, Thanks for the review! I'll defer to Anju on most of the aspects, but... On 2017/02/01 09:53PM, Michael Ellerman wrote: > Anju T Sudhakar writes: > > > +static void optimized_callback(struct optimized_kprobe *op, > > + struct pt_regs *regs) > > +{ > > +

[PATCH] powerpc: kprobes: fixes for kprobe_lookup_name on BE

2017-01-31 Thread Naveen N. Rao
other headers, and - two, with a missing const qualifier for a local variable which ends up referring a string literal. Again, this is unique to how kprobe_lookup_name is being invoked in optprobes.c Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/inclu

[PATCH] powerpc: kprobes: fixes for kprobe_lookup_name on BE

2017-01-31 Thread Naveen N. Rao
other headers, and - two, with a missing const qualifier for a local variable which ends up referring a string literal. Again, this is unique to how kprobe_lookup_name is being invoked in optprobes.c Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/kprobes.h | 3 ++- 1 file changed, 2

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-01-30 Thread Naveen N. Rao
t; is within ± 32MB. > > > > Signed-off-by: Anju T Sudhakar <a...@linux.vnet.ibm.com> > > Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > > --- > > .../features/debug/optprobes/arch-support.txt | 2 +- > > arch/powerpc/Kcon

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-01-30 Thread Naveen N. Rao
is purpose. > > > > Instructions which can be emulated using analyse_instr() are suppliants > > for optimization. Before optimization ensure that the address range > > between the detour buffer allocated and the instruction being probed > > is within ± 32MB. > >

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-01-04 Thread Naveen N. Rao
nd the instruction being probed > > is within ± 32MB. > > > > Signed-off-by: Anju T Sudhakar <a...@linux.vnet.ibm.com> > > Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > > Looks good to me :) > > Acked-by: Masami Hiramatsu <mhira...@kernel.org> Thanks, Masami! Ben/Michael, Can you please take a look and let us know your thoughts on this? - Naveen

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-01-04 Thread Naveen N. Rao
ng probed > > is within ± 32MB. > > > > Signed-off-by: Anju T Sudhakar > > Signed-off-by: Naveen N. Rao > > Looks good to me :) > > Acked-by: Masami Hiramatsu Thanks, Masami! Ben/Michael, Can you please take a look and let us know your thoughts on this? - Naveen

Re: [PATCH V2 0/4] OPTPROBES for powerpc

2016-12-16 Thread Naveen N. Rao
On 2016/12/17 01:46AM, Balbir Singh wrote: > > > On 15/12/16 03:18, Anju T Sudhakar wrote: > > This is the V2 patchset of the kprobes jump optimization > > (a.k.a OPTPROBES)for powerpc. Kprobe being an inevitable tool > > for kernel developers, enhancing the performance of kprobe has > > got

Re: [PATCH V2 0/4] OPTPROBES for powerpc

2016-12-16 Thread Naveen N. Rao
On 2016/12/17 01:46AM, Balbir Singh wrote: > > > On 15/12/16 03:18, Anju T Sudhakar wrote: > > This is the V2 patchset of the kprobes jump optimization > > (a.k.a OPTPROBES)for powerpc. Kprobe being an inevitable tool > > for kernel developers, enhancing the performance of kprobe has > > got

Re: [PATCH v7 0/6] perf annotate: Cross arch support + few fixes

2016-11-16 Thread Naveen N. Rao
d very much like to use this for better code annotation and browsing. FWIW, I have tested this on powerpc. Tested-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Thanks, Naveen

Re: [PATCH v7 0/6] perf annotate: Cross arch support + few fixes

2016-11-16 Thread Naveen N. Rao
d very much like to use this for better code annotation and browsing. FWIW, I have tested this on powerpc. Tested-by: Naveen N. Rao Thanks, Naveen

Re: [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE

2016-11-03 Thread Naveen N. Rao
+ > 6 files changed, 460 insertions(+), 20 deletions(-) > create mode 100644 arch/powerpc/lib/test_emulate_step.c Patch 2 can be folded into the third patch. Apart from that, and the minor nit with patch 3, for this series: Reviewed-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Thanks, Naveen

Re: [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE

2016-11-03 Thread Naveen N. Rao
+ > 6 files changed, 460 insertions(+), 20 deletions(-) > create mode 100644 arch/powerpc/lib/test_emulate_step.c Patch 2 can be folded into the third patch. Apart from that, and the minor nit with patch 3, for this series: Reviewed-by: Naveen N. Rao Thanks, Naveen

Re: [PATCH 3/3] powerpc: emulate_step test for load/store instructions

2016-11-02 Thread Naveen N. Rao
On 2016/11/02 02:23PM, Ravi Bangoria wrote: > Add new selftest that test emulate_step for Normal, Floating Point, > Vector and Vector Scalar - load/store instructions. Test should run > at boot time if CONFIG_KPROBES_SANITY_TEST and CONFIG_PPC64 is set. > > Sample log: > > [0.762063]

Re: [PATCH 3/3] powerpc: emulate_step test for load/store instructions

2016-11-02 Thread Naveen N. Rao
On 2016/11/02 02:23PM, Ravi Bangoria wrote: > Add new selftest that test emulate_step for Normal, Floating Point, > Vector and Vector Scalar - load/store instructions. Test should run > at boot time if CONFIG_KPROBES_SANITY_TEST and CONFIG_PPC64 is set. > > Sample log: > > [0.762063]

Re: [PATCH] perf annotate: Cleanup arch specific stuff

2016-10-10 Thread Naveen N. Rao
On 2016/10/10 01:24PM, Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 10, 2016 at 07:29:02PM +0530, Ravi Bangoria escreveu: > > Move arch specific stuff from util/annotate.c to their respective > > files in util/annotate directory. > > > > No functionality changes. > > > > Signed-off-by: Ravi

Re: [PATCH] perf annotate: Cleanup arch specific stuff

2016-10-10 Thread Naveen N. Rao
On 2016/10/10 01:24PM, Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 10, 2016 at 07:29:02PM +0530, Ravi Bangoria escreveu: > > Move arch specific stuff from util/annotate.c to their respective > > files in util/annotate directory. > > > > No functionality changes. > > > > Signed-off-by: Ravi

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Naveen N. Rao
On 2016/09/26 11:00AM, Daniel Borkmann wrote: > On 09/26/2016 10:56 AM, Naveen N. Rao wrote: > > On 2016/09/24 03:30AM, Alexei Starovoitov wrote: > > > On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: > > > > On 09/23/2016 10:35 PM, Naveen N. Rao wro

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Naveen N. Rao
On 2016/09/26 11:00AM, Daniel Borkmann wrote: > On 09/26/2016 10:56 AM, Naveen N. Rao wrote: > > On 2016/09/24 03:30AM, Alexei Starovoitov wrote: > > > On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: > > > > On 09/23/2016 10:35 PM, Naveen N. Rao wro

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Naveen N. Rao
On 2016/09/24 03:30AM, Alexei Starovoitov wrote: > On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: > > On 09/23/2016 10:35 PM, Naveen N. Rao wrote: > > >Tail calls allow JIT'ed eBPF programs to call into other JIT'ed eBPF > > >programs. This can be

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Naveen N. Rao
On 2016/09/24 03:30AM, Alexei Starovoitov wrote: > On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: > > On 09/23/2016 10:35 PM, Naveen N. Rao wrote: > > >Tail calls allow JIT'ed eBPF programs to call into other JIT'ed eBPF > > >programs. This can be

[PATCH 1/2] bpf samples: fix compiler errors with sockex2 and sockex3

2016-09-23 Thread Naveen N. Rao
These samples fail to compile as 'struct flow_keys' conflicts with definition in net/flow_dissector.h. Fix the same by renaming the structure used in the sample. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- samples/bpf/sockex2_kern.c | 10 +- sampl

[PATCH 2/2] bpf samples: update tracex5 sample to use __seccomp_filter

2016-09-23 Thread Naveen N. Rao
seccomp_phase1() does not exist anymore. Instead, update sample to use __seccomp_filter(). While at it, set max locked memory to unlimited. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- I am not completely sure if __seccomp_filter is the right place to hook in. This

[PATCH 2/2] bpf samples: update tracex5 sample to use __seccomp_filter

2016-09-23 Thread Naveen N. Rao
seccomp_phase1() does not exist anymore. Instead, update sample to use __seccomp_filter(). While at it, set max locked memory to unlimited. Signed-off-by: Naveen N. Rao --- I am not completely sure if __seccomp_filter is the right place to hook in. This works for me though. Please review

[PATCH 1/2] bpf samples: fix compiler errors with sockex2 and sockex3

2016-09-23 Thread Naveen N. Rao
These samples fail to compile as 'struct flow_keys' conflicts with definition in net/flow_dissector.h. Fix the same by renaming the structure used in the sample. Signed-off-by: Naveen N. Rao --- samples/bpf/sockex2_kern.c | 10 +- samples/bpf/sockex3_kern.c | 8 samples/bpf

[PATCH 3/3] bpf powerpc: add support for bpf constant blinding

2016-09-23 Thread Naveen N. Rao
6c: xoris r2,r2,48399 70: rotlwi r2,r2,0 74: mr r8,r2 78: rotlwi r8,r8,0 7c: ld r27,-40(r1) 80: ld r28,-32(r1) 84: mr r3,r8 88: blr Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/net/bpf_jit64.h

[PATCH 3/3] bpf powerpc: add support for bpf constant blinding

2016-09-23 Thread Naveen N. Rao
6c: xoris r2,r2,48399 70: rotlwi r2,r2,0 74: mr r8,r2 78: rotlwi r8,r8,0 7c: ld r27,-40(r1) 80: ld r28,-32(r1) 84: mr r3,r8 88: blr Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit64.h | 9 + arch/powerpc/net

[PATCH 1/3] bpf powerpc: introduce accessors for using the tmp local stack space

2016-09-23 Thread Naveen N. Rao
While at it, ensure that the location of the local save area is consistent whether or not we setup our own stackframe. This property is utilised in the next patch that adds support for tail calls. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/net/bpf_j

[PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-23 Thread Naveen N. Rao
calls themselves, the first two instructions are NOPs. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/include/asm/ppc-opcode.h | 2 + arch/powerpc/net/bpf_jit.h| 2 + arch/powerpc/net/bpf_jit64.h | 1 + arch/powerpc/net/bpf_jit_co

[PATCH 1/3] bpf powerpc: introduce accessors for using the tmp local stack space

2016-09-23 Thread Naveen N. Rao
While at it, ensure that the location of the local save area is consistent whether or not we setup our own stackframe. This property is utilised in the next patch that adds support for tail calls. Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit64.h | 16 +--- arch/powerpc/net

[PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-23 Thread Naveen N. Rao
calls themselves, the first two instructions are NOPs. Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 2 + arch/powerpc/net/bpf_jit.h| 2 + arch/powerpc/net/bpf_jit64.h | 1 + arch/powerpc/net/bpf_jit_comp64.c | 149

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-15 Thread Naveen N. Rao
On 2016/09/14 02:00PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 14, 2016 at 10:04:28PM +0530, Naveen N. Rao escreveu: > > On 2016/09/14 10:52AM, Arnaldo Carvalho de Melo wrote: > > > And yeah, I'll try and cross-build audit-lib for my powerpc cross build > > > cont

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-15 Thread Naveen N. Rao
On 2016/09/14 02:00PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 14, 2016 at 10:04:28PM +0530, Naveen N. Rao escreveu: > > On 2016/09/14 10:52AM, Arnaldo Carvalho de Melo wrote: > > > And yeah, I'll try and cross-build audit-lib for my powerpc cross build > > > cont

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Naveen N. Rao
On 2016/09/14 10:52AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 14, 2016 at 02:58:10PM +0530, Naveen N. Rao escreveu: > > On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo > > > escr

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Naveen N. Rao
On 2016/09/14 10:52AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 14, 2016 at 02:58:10PM +0530, Naveen N. Rao escreveu: > > On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo > > > escr

<    2   3   4   5   6   7   8   9   10   11   >