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] emulat

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 Bang

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. Th

[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 s

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

2016-09-23 Thread Naveen N. Rao
2,r2,39131 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/p

[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
t don't do tail 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_ji

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 > > >

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 > > > escrev

Re: [PATCH 2/2] tools include: Add mman macros needed by perf for all arch

2016-09-14 Thread Naveen N. Rao
man.h for each archs, defines these missing > macros for perf. For missing MADV_*, fall back to asm-generic/mman-common > because they are in 'case ...' statement. For flags, define to 0. This resolves the build issue on powerpc, thanks! Tested-by: Naveen N. Rao

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

2016-09-14 Thread Naveen N. Rao
On 2016/09/14 06:23PM, Wang Nan wrote: > > > On 2016/9/14 18:00, Naveen N. Rao wrote: > > On 2016/09/14 05:36PM, Wang Nan wrote: > > > > > > On 2016/9/14 17:28, Naveen N. Rao wrote: > > > > On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: >

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

2016-09-14 Thread Naveen N. Rao
On 2016/09/14 05:36PM, Wang Nan wrote: > > > On 2016/9/14 17:28, Naveen N. Rao wrote: > > 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 > > > escreveu: > > > > Em Mo

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

2016-09-14 Thread Naveen N. Rao
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 escreveu: > > Em Mon, Sep 12, 2016 at 12:54:29PM +, Wang Nan escreveu: > > > Some mmap related macros have different values for different > > > architectures. This patch i

Re: [PATCH v2 2/2] perf uprobe: Skip prologue if program compiled without optimization

2016-08-18 Thread Naveen N. Rao
address > to force probe on function entry. > > tools/perf/util/probe-finder.c | 164 > + > 1 file changed, 164 insertions(+) This fixes the uprobe issue reported by Michael Petlan: https://www.mail-archive.com/linux-perf-users@vger.kernel.org/msg02348.html Acked-by: Naveen N. Rao

Re: [PATCH v2] perf symbols: Fix annotation of objects with debuginfo files

2016-08-15 Thread Naveen N. Rao
On 2016/08/15 03:13PM, Wang Nan wrote: > > > On 2016/8/13 9:55, Anton Blanchard wrote: > > From: Anton Blanchard > > > > Commit 73cdf0c6ea9c ("perf symbols: Record text offset in dso > > to calculate objdump address") started storing the offset of > > the text section for all DSOs: > > > >

Re: [PATCH v2] perf symbols: Fix annotation of objects with debuginfo files

2016-08-14 Thread Naveen N. Rao
time_ss->elf, &runtime_ss->ehdr, &tshdr, > + ".text", NULL)) > dso->text_offset = tshdr.sh_addr - tshdr.sh_offset; > > if (runtime_ss->opdsec) Reviewed-by: Naveen N. Rao Thanks Anton! - Naveen

Re: [PATCH] perf symbols: Fix annotation of objects with debuginfo files

2016-08-12 Thread Naveen N. Rao
On 2016/08/12 04:35PM, Anton Blanchard wrote: > From: Anton Blanchard > > Commit 73cdf0c6ea9c ("perf symbols: Record text offset in dso > to calculate objdump address") started storing the offset of > the text section for all DSOs: > >if (elf_section_by_name(elf, &ehdr, &tshdr, ".text",

Re: [PATCHv2 0/7] eBPF JIT for PPC64

2016-06-30 Thread Naveen N. Rao
On 2016/06/30 12:34PM, Denis Kirjanov wrote: > On 6/30/16, Andreas Ziegler wrote: > > Hi Naveen, > > > > this patchset makes a change to arch/powerpc/net/Makefile in order to only > > compile the previously existing bpf_jit_comp.c if !CONFIG_PPC64, and use > > bpf_jit_comp64.c if CONFIG_PPC64 is e

Re: [PATCH v2 3/4] perf annotate: add powerpc support

2016-06-29 Thread Naveen N. Rao
On 2016/06/29 04:45PM, Ravi Bangoria wrote: > From: Naveen N. Rao > > Powerpc has long list of branch instructions and hardcoding them in > table appears to be error-prone. So, add new function to find > instruction instead of creating table. This function dynamically > cr

[tip:perf/core] perf annotate: Generalize handling of 'ret' instructions

2016-06-29 Thread tip-bot for Naveen N. Rao
Commit-ID: 6ef9492915b09816c75bb41e7e37b2e507d2f70f Gitweb: http://git.kernel.org/tip/6ef9492915b09816c75bb41e7e37b2e507d2f70f Author: Naveen N. Rao AuthorDate: Fri, 24 Jun 2016 17:23:58 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 27 Jun 2016 14:25:05 -0300 perf

Re: linux-next: manual merge of the powerpc tree with Linus' tree

2016-06-28 Thread Naveen N. Rao
On 2016/06/29 10:35AM, Stephen Rothwell wrote: > Hi all, Hi Stephen, > > Today's linux-next merge of the powerpc tree got a conflict in: > > arch/powerpc/Kconfig > > between commit: > > 844e3be47693 ("powerpc/bpf/jit: Disable classic BPF JIT on ppc64le") Ah, I see that the above commit i

[PATCHv2 5/7] ppc: bpf/jit: A few cleanups

2016-06-22 Thread Naveen N. Rao
ahalli Cc: Thadeu Lima de Souza Cascardo Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 13 +++-- arch/powerpc/net/bpf_jit_comp.c | 8 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/p

[PATCHv2 3/7] ppc: bpf/jit: Optimize 64-bit Immediate loads

2016-06-22 Thread Naveen N. Rao
Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Thadeu Lima de Souza Cascardo Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/net/b

[PATCHv2 2/7] ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation

2016-06-22 Thread Naveen N. Rao
Cc: Thadeu Lima de Souza Cascardo Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index 889fd19..a9882db 100644

[PATCHv2 6/7] ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate header

2016-06-22 Thread Naveen N. Rao
vid S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Thadeu Lima de Souza Cascardo Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 121 +- arch/powerpc/net/bpf_jit32.h| 139

[PATCHv2 1/7] ppc bpf/jit: Disable classic BPF JIT on ppc64le

2016-06-22 Thread Naveen N. Rao
: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Thadeu Lima de Souza Cascardo Reported-by: Thadeu Lima de Souza Cascardo Signed-off-by: Naveen N. Rao --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCHv2 0/7] eBPF JIT for PPC64

2016-06-22 Thread Naveen N. Rao
4 [2] http://thread.gmane.org/gmane.linux.ports.ppc.embedded/96514 Naveen N. Rao (7): ppc bpf/jit: Disable classic BPF JIT on ppc64le ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation ppc: bpf/jit: Optimize 64-bit Immediate loads ppc: bpf/jit: Introduce rotate immediate in

[PATCHv2 7/7] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-22 Thread Naveen N. Rao
"David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Thadeu Lima de Souza Cascardo Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- arch/powerpc/Kconfig | 3 +- arch/powerpc/include/asm/asm-compat.h | 2 + arch/powerpc/include/asm/ppc-opcode.h | 2

[PATCHv2 4/7] ppc: bpf/jit: Introduce rotate immediate instructions

2016-06-22 Thread Naveen N. Rao
s Kirjanov Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Thadeu Lima de Souza Cascardo Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-op

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-22 Thread Naveen N. Rao
On 2016/06/22 12:42PM, Naveen N Rao wrote: > On 2016/06/21 11:47AM, Thadeu Lima de Souza Cascardo wrote: > > On Tue, Jun 21, 2016 at 09:15:48PM +1000, Michael Ellerman wrote: > > > On Tue, 2016-06-21 at 14:28 +0530, Naveen N. Rao wrote: > > > > On 2016/06/20 03:56PM,

Re: [PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-22 Thread Naveen N. Rao
On 2016/06/22 08:37PM, Michael Ellerman wrote: > On Tue, 2016-06-07 at 19:02 +0530, Naveen N. Rao wrote: > > > PPC64 eBPF JIT compiler. > > > > Enable with: > > echo 1 > /proc/sys/net/core/bpf_jit_enable > > or > > echo 2 > /proc/sys/net/core/bpf_

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-22 Thread Naveen N. Rao
On 2016/06/21 11:47AM, Thadeu Lima de Souza Cascardo wrote: > On Tue, Jun 21, 2016 at 09:15:48PM +1000, Michael Ellerman wrote: > > On Tue, 2016-06-21 at 14:28 +0530, Naveen N. Rao wrote: > > > On 2016/06/20 03:56PM, Thadeu Lima de Souza Cascardo wrote: > > > > On S

Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-22 Thread Naveen N. Rao
On 2016/06/21 09:04PM, Michael Ellerman wrote: > On Tue, 2016-06-21 at 12:28 +0530, Naveen N. Rao wrote: > > On 2016/06/21 09:38AM, Michael Ellerman wrote: > > > On Sun, 2016-06-19 at 23:06 +0530, Naveen N. Rao wrote: > > > > > > > > #inc

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-21 Thread Naveen N. Rao
On 2016/06/20 03:56PM, Thadeu Lima de Souza Cascardo wrote: > On Sun, Jun 19, 2016 at 11:19:14PM +0530, Naveen N. Rao wrote: > > On 2016/06/17 10:00AM, Thadeu Lima de Souza Cascardo wrote: > > > > > > Hi, Michael and Naveen. > > > > > > I noticed i

Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-21 Thread Naveen N. Rao
On 2016/06/21 09:38AM, Michael Ellerman wrote: > On Sun, 2016-06-19 at 23:06 +0530, Naveen N. Rao wrote: > > On 2016/06/17 10:53PM, Michael Ellerman wrote: > > > On Tue, 2016-07-06 at 13:32:23 UTC, "Naveen N. Rao" wrote: > > > > diff --git a/arch/powe

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-19 Thread Naveen N. Rao
On 2016/06/17 10:00AM, Thadeu Lima de Souza Cascardo wrote: > On Fri, Jun 17, 2016 at 10:53:21PM +1000, Michael Ellerman wrote: > > On Tue, 2016-07-06 at 13:32:23 UTC, "Naveen N. Rao" wrote: > > > diff --git a/arch/powerpc/net/bpf_jit_comp64.c > > > b/arch/p

Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-19 Thread Naveen N. Rao
On 2016/06/17 10:53PM, Michael Ellerman wrote: > On Tue, 2016-07-06 at 13:32:23 UTC, "Naveen N. Rao" wrote: > > diff --git a/arch/powerpc/net/bpf_jit_comp64.c > > b/arch/powerpc/net/bpf_jit_comp64.c > > new file mode 100644 > > index 000..954ff53 > &g

Re: [PATCH 0/6] eBPF JIT for PPC64

2016-06-12 Thread Naveen N. Rao
On 2016/06/10 10:47PM, David Miller wrote: > From: "Naveen N. Rao" > Date: Tue, 7 Jun 2016 19:02:17 +0530 > > > Please note that patch [2] is a pre-requisite for this patchset, and is > > not yet upstream. > ... > > [1] http://thread.gmane.org

Re: [PATCH 2/2] perf annotate: add powerpc support

2016-06-10 Thread Naveen N. Rao
On 2016/06/10 08:08PM, Naveen N. Rao wrote: > On 2016/06/10 10:36AM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Jun 10, 2016 at 06:32:51PM +0530, Naveen N. Rao escreveu: > > > Convert ins__find() to a __weak function for generic functionality, > > > while adding a p

Re: [PATCH 2/2] perf annotate: add powerpc support

2016-06-10 Thread Naveen N. Rao
On 2016/06/10 10:36AM, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 10, 2016 at 06:32:51PM +0530, Naveen N. Rao escreveu: > > Convert ins__find() to a __weak function for generic functionality, > > while adding a powerpc-specific variant. We look at the function name > > fo

Re: [PATCH 1/2] perf annotate: generalize handling of ret instructions

2016-06-10 Thread Naveen N. Rao
On 2016/06/10 10:30AM, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 10, 2016 at 06:32:50PM +0530, Naveen N. Rao escreveu: > > Introduce helper to detect ret instructions and use the same in the tui. Hi Arnaldo, Thanks for the review. > > Humm, I think this is simpler and equiv

[PATCH 1/2] perf annotate: generalize handling of ret instructions

2016-06-10 Thread Naveen N. Rao
Introduce helper to detect ret instructions and use the same in the tui. Cc: Arnaldo Carvalho de Melo Cc: Anton Blanchard Cc: Michael Ellerman Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- tools/perf/ui/browsers/annotate.c | 20 +--- tools/perf/util

[PATCH 2/2] perf annotate: add powerpc support

2016-06-10 Thread Naveen N. Rao
: Arnaldo Carvalho de Melo Cc: Anton Blanchard Cc: Michael Ellerman Cc: Ananth N Mavinakayanahalli Reported-by: Anton Blanchard Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/annotate.c | 58 + tools

Re: [PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-08 Thread Naveen N. Rao
On 2016/06/08 10:19PM, Nilay Vaish wrote: > Naveen, can you point out where in the patch you update the variable: > idx, a member of codegen_contex structure? Somehow I am unable to > figure it out. I can only see that we set it to 0 in the > bpf_int_jit_compile function. Since all your test cas

Re: [PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-08 Thread Naveen N. Rao
On 2016/06/07 03:56PM, Alexei Starovoitov wrote: > On Tue, Jun 07, 2016 at 07:02:23PM +0530, Naveen N. Rao wrote: > > PPC64 eBPF JIT compiler. > > > > Enable with: > > echo 1 > /proc/sys/net/core/bpf_jit_enable > > or > > echo 2 > /proc/sys/ne

[PATCH 3/6] ppc: bpf/jit: Introduce rotate immediate instructions

2016-06-07 Thread Naveen N. Rao
s Kirjanov Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/net/bpf_jit.h| 20 +

[PATCH 1/6] ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation

2016-06-07 Thread Naveen N. Rao
Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index 889fd19..a9882db 100644 --- a/arch/powerpc/net/bpf_jit.h +++ b/arch/powerpc/net/bpf_jit.h

[PATCH 4/6] ppc: bpf/jit: A few cleanups

2016-06-07 Thread Naveen N. Rao
li Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 13 +++-- arch/powerpc/net/bpf_jit_comp.c | 8 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index 95d0e38..9041d3f 100644 --- a/arch/p

[PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-06-07 Thread Naveen N. Rao
"David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/Kconfig | 3 +- arch/powerpc/include/asm/asm-compat.h | 2 + arch/powerpc/include/asm/ppc-opcode.h | 20 +- arch/powerpc/net/Makefile | 4 + arch/powerpc

[PATCH 2/6] ppc: bpf/jit: Optimize 64-bit Immediate loads

2016-06-07 Thread Naveen N. Rao
Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index a9882db..4c1e055 10

[PATCH 5/6] ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate header

2016-06-07 Thread Naveen N. Rao
vid S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 121 +- arch/powerpc/net/bpf_jit32.h| 139 arch/powerpc/net/bpf_jit_asm.S | 2 +- arch/powerpc/net/bpf_

[PATCH 0/6] eBPF JIT for PPC64

2016-06-07 Thread Naveen N. Rao
t for BPF constant blinding Please note that patch [2] is a pre-requisite for this patchset, and is not yet upstream. - Naveen [1] http://thread.gmane.org/gmane.linux.kernel/2188694 [2] http://thread.gmane.org/gmane.linux.ports.ppc.embedded/96514 Naveen N. Rao (6): ppc: bpf/jit: Fix/enhance 3

Re: [RFC PATCH v2 1/3] arch/powerpc : Add detour buffer support for optprobes

2016-05-30 Thread Naveen N. Rao
On 2016/05/24 03:45PM, Madhavan Srinivasan wrote: > > > On Thursday 19 May 2016 08:40 PM, Anju T wrote: > > Detour buffer contains instructions to create an in memory pt_regs. > > After the execution of prehandler a call is made for instruction emulation. > > The NIP is decided after the probed i

Re: [RFC PATCH v2 1/3] arch/powerpc : Add detour buffer support for optprobes

2016-05-24 Thread Naveen N. Rao
On 2016/05/19 08:40PM, Anju T wrote: > Detour buffer contains instructions to create an in memory pt_regs. > After the execution of prehandler a call is made for instruction emulation. > The NIP is decided after the probed instruction is executed. Hence a branch > instruction is created to the NIP

Re: perf tools: add support for generating bpf prologue on powerpc

2016-05-07 Thread Naveen N. Rao
On 2016/05/07 02:15PM, Michael Ellerman wrote: > On Thu, 2016-05-05 at 15:23:19 UTC, "Naveen N. Rao" wrote: > > Generalize existing macros to serve the purpose. > > > > Cc: Wang Nan > > Cc: Arnaldo Carvalho de Melo > > Cc: Masami Hiramatsu &

[tip:perf/core] perf powerpc: Fix kprobe and kretprobe handling with kallsyms on ppc64le

2016-05-05 Thread tip-bot for Naveen N. Rao
Commit-ID: 239aeba764092b29dd7cab177cd47f472390622e Gitweb: http://git.kernel.org/tip/239aeba764092b29dd7cab177cd47f472390622e Author: Naveen N. Rao AuthorDate: Tue, 12 Apr 2016 14:40:49 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 5 May 2016 21:04:02 -0300 perf powerpc

[tip:perf/core] perf symbols: Fix kallsyms perf test on ppc64le

2016-05-05 Thread tip-bot for Naveen N. Rao
Commit-ID: 0b3c2264ae30ed692fd1ffd2b84c5fbdf737cb0d Gitweb: http://git.kernel.org/tip/0b3c2264ae30ed692fd1ffd2b84c5fbdf737cb0d Author: Naveen N. Rao AuthorDate: Tue, 12 Apr 2016 14:40:50 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 5 May 2016 21:04:03 -0300 perf symbols

[tip:perf/core] perf tools powerpc: Add support for generating bpf prologue

2016-05-05 Thread tip-bot for Naveen N. Rao
Commit-ID: 4679bccaa30893ccc5be35c5c5d44f5ab60c0a08 Gitweb: http://git.kernel.org/tip/4679bccaa30893ccc5be35c5c5d44f5ab60c0a08 Author: Naveen N. Rao AuthorDate: Thu, 5 May 2016 20:53:19 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 5 May 2016 21:03:58 -0300 perf tools

[PATCH] perf tools: add support for generating bpf prologue on powerpc

2016-05-05 Thread Naveen N. Rao
Generalize existing macros to serve the purpose. Cc: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Cc: Ian Munsie Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- With this patch: # ./perf test 37 37: Test BPF filter

Re: [PATCH 0/3] Add support for perf user stack dump in powerpc

2016-04-28 Thread Naveen N. Rao
On 2016/04/28 12:29PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 28, 2016 at 07:53:41PM +0530, Naveen N. Rao escreveu: > > On 2016/04/28 03:01PM, Chandan Kumar wrote: > > > This patch set enables perf user stack dump on powerpc > > > > For this patch-set:

Re: [PATCH 0/3] Add support for perf user stack dump in powerpc

2016-04-28 Thread Naveen N. Rao
On 2016/04/28 03:01PM, Chandan Kumar wrote: > This patch set enables perf user stack dump on powerpc For this patch-set: Reviewed-by: Naveen N. Rao I suppose that implies my testing, but nonetheless: Tested-by: Naveen N. Rao > > Example with "ls" command as user prog

Re: [PATCH v2 0/2] perf probe fixes for ppc64le

2016-04-27 Thread Naveen N. Rao
On 2016/04/12 02:40PM, Naveen N Rao wrote: > This patchset fixes three issues found with perf probe on ppc64le: > 1. 'perf test kallsyms' failure on ppc64le (reported by Michael > Ellerman). This was due to the symbols being fixed up during symbol > table load. This is fixed

Re: [PATCH V11 2/4] perf/powerpc: add support for sampling intr machine state

2016-04-21 Thread Naveen N. Rao
On 2016/02/20 10:32AM, Anju T wrote: > The perf infrastructure uses a bit mask to find out valid > registers to display. Define a register mask for supported > registers defined in asm/perf_regs.h. The bit positions also > correspond to register IDs which is used by perf infrastructure > to fetch t

Re: [PATCH V11 1/4] perf/powerpc: assign an id to each powerpc register

2016-04-21 Thread Naveen N. Rao
On 2016/02/20 10:32AM, Anju T wrote: > The enum definition assigns an 'id' to each register in "struct pt_regs" > of arch/powerpc. The order of these values in the enum definition are > based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h. > > Signed-off-by: Anju T > --- >

[PATCH v2 0/2] perf probe fixes for ppc64le

2016-04-12 Thread Naveen N. Rao
nn Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Balbir Singh Cc: Ananth N Mavinakayanahalli Naveen N. Rao (2): perf tools: Fix kprobe and kretprobe handling with kallsyms on ppc64le perf tools: Fix kallsyms perf test on ppc64le tools/perf/arch/

[PATCH v2 1/2] perf tools: Fix kprobe and kretprobe handling with kallsyms on ppc64le

2016-04-12 Thread Naveen N. Rao
: Michael Ellerman Cc: Balbir Singh Reported-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- v2: Removed un-necessary check for uprobes tools/perf/arch/powerpc/util/sym-handling.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/perf/arch

[PATCH v2 2/2] perf tools: Fix kallsyms perf test on ppc64le

2016-04-12 Thread Naveen N. Rao
h-specific member of perf symbol structure, and later use this to adjust the probe trace point. Cc: Mark Wielaard Cc: Thiago Jung Bauermann Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Cc: Balbir Singh Acked-by: Ananth N Mavinakayanahalli Reported-by: Michael Ellerman Signed-off-by: Nav

Re: [PATCH 0/2] perf probe fixes for ppc64le

2016-04-11 Thread Naveen N. Rao
On 2016/04/11 02:41PM, Michael Ellerman wrote: > On Sat, 2016-04-09 at 19:12 +0530, Naveen N. Rao wrote: > > > > I suppose this boils down to the quirkiness of ABIv2. Though, in > > reality, I don't think most users will notice. As I stated above, users > >

Re: [PATCH 0/2] perf probe fixes for ppc64le

2016-04-09 Thread Naveen N. Rao
On 2016/04/08 04:57PM, Balbir Singh wrote: > On Thu, 2016-04-07 at 14:56 +0530, Naveen N. Rao wrote: > > On 2016/04/07 06:19PM, Balbir Singh wrote: > > >  > > >  > > > On 06/04/16 22:32, Naveen N. Rao wrote: > > > >  > > > > This

Re: [PATCH 0/2] perf probe fixes for ppc64le

2016-04-07 Thread Naveen N. Rao
On 2016/04/07 06:19PM, Balbir Singh wrote: > > On 06/04/16 22:32, Naveen N. Rao wrote: > > This patchset fixes three issues found with perf probe on ppc64le: > > 1. 'perf test kallsyms' failure on ppc64le (reported by Michael > > Ellerman). This was due to the sy

Re: [PATCH 1/2] perf/powerpc: Fix kprobe and kretprobe handling with kallsyms

2016-04-06 Thread Naveen N. Rao
On 2016/04/07 10:00AM, Ananth N wrote: > On Wed, Apr 06, 2016 at 06:02:57PM +0530, Naveen N. Rao wrote: > > > + if (!pev->uprobes && map->dso->symtab_type == DSO_BINARY_TYPE__KALLSYMS) > > tev->point.offset += PPC64LE_LEP_OFFSET; > > u

[PATCH 0/2] perf probe fixes for ppc64le

2016-04-06 Thread Naveen N. Rao
c: Masami Hiramatsu Cc: Michael Ellerman Cc: Ananth N Mavinakayanahalli Naveen N. Rao (2): perf/powerpc: Fix kprobe and kretprobe handling with kallsyms tools/perf: Fix kallsyms perf test on ppc64le tools/perf/arch/powerpc/util/sym-handling.c | 41

[PATCH 1/2] perf/powerpc: Fix kprobe and kretprobe handling with kallsyms

2016-04-06 Thread Naveen N. Rao
: Michael Ellerman Reported-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util

[PATCH 2/2] tools/perf: Fix kallsyms perf test on ppc64le

2016-04-06 Thread Naveen N. Rao
Cc: Thiago Jung Bauermann Cc: Ananth N Mavinakayanahalli Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 24 tools/perf/util/probe-event.c

Re: [PATCH net 4/4] lib/test_bpf: Add additional BPF_ADD tests

2016-04-05 Thread Naveen N. Rao
On 2016/04/05 09:28AM, Alexei Starovoitov wrote: > On 4/5/16 3:02 AM, Naveen N. Rao wrote: > >Some of these tests proved useful with the powerpc eBPF JIT port due to > >sign-extended 16-bit immediate loads. Though some of these aspects get > >covered in other tests, it is be

Re: [PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-05 Thread Naveen N. Rao
On 2016/04/05 09:20AM, Alexei Starovoitov wrote: > On 4/5/16 3:02 AM, Naveen N. Rao wrote: > >Unsigned Jump-if-Greater-Than. > > > >Cc: Alexei Starovoitov > >Cc: Daniel Borkmann > >Cc: "David S. Miller" > >Cc: Ananth N Mavinakayanahalli > >

[PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-05 Thread Naveen N. Rao
Unsigned Jump-if-Greater-Than. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_bpf.c | 29 + 1 file changed, 29 insertion

[PATCH net 1/4] lib/test_bpf: Fix JMP_JSET tests

2016-04-05 Thread Naveen N. Rao
JMP_JSET tests incorrectly used BPF_JNE. Fix the same. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_bpf.c | 8 1 file changed, 4 insert

[PATCH net 3/4] lib/test_bpf: Add test to check for result of 32-bit add that overflows

2016-04-05 Thread Naveen N. Rao
BPF_ALU32 and BPF_ALU64 tests for adding two 32-bit values that results in 32-bit overflow. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_

[PATCH net 4/4] lib/test_bpf: Add additional BPF_ADD tests

2016-04-05 Thread Naveen N. Rao
: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_bpf.c | 128 + 1 file changed, 128 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c ind

Re: [RFC PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-04-04 Thread Naveen N. Rao
On 2016/04/01 08:34PM, Daniel Borkmann wrote: > On 04/01/2016 08:10 PM, Alexei Starovoitov wrote: > >On 4/1/16 2:58 AM, Naveen N. Rao wrote: > >>PPC64 eBPF JIT compiler. Works for both ABIv1 and ABIv2. > >> > >>Enable with: > >>echo 1 > /proc/sys/n

[PATCHv2 net 3/3] samples/bpf: Enable powerpc support

2016-04-04 Thread Naveen N. Rao
vid S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- v2: updated macros using ({ }) gcc extension as per Alexei samples/bpf/bpf_helpers.h | 26 ++ samples/bpf/spintest_kern.c | 2 +- samples/bpf/tracex2_kern.c

[PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-04-04 Thread Naveen N. Rao
: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- v2: no changes samples/bpf/map_perf_test_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sam

[PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-04 Thread Naveen N. Rao
While at it, remove the generation of .s files and fix some typos in the related comment. Cc: Alexei Starovoitov Cc: David S. Miller Cc: Daniel Borkmann Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- v2: removed generation of .s files samples/bpf

Re: [PATCH 4/4] samples/bpf: Enable powerpc support

2016-04-01 Thread Naveen N. Rao
On 2016/03/31 10:52AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > ... > >+ > >+#ifdef __powerpc__ > >+#define BPF_KPROBE_READ_RET_IP(ip, ctx) { (ip) = (ctx)->link; } > >+#define BPF_KRETPROBE_READ_RET_IP(ip, ctx) BPF_KPRO

Re: [PATCH 2/4] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-01 Thread Naveen N. Rao
On 2016/03/31 08:19PM, Daniel Borkmann wrote: > On 03/31/2016 07:46 PM, Alexei Starovoitov wrote: > >On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >> clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ > >> -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unu

Re: [RFC PATCH 0/6] eBPF JIT for PPC64

2016-04-01 Thread Naveen N. Rao
On 2016/04/01 03:28PM, Naveen N Rao wrote: > Implement extended BPF JIT for ppc64. We retain the classic BPF JIT for > ppc32 and move ppc64 BE/LE to use the new JIT. Classic BPF filters will > be converted to extended BPF (see convert_filter()) and JIT'ed with the > new compiler.

[RFC PATCH 3/6] ppc: bpf/jit: Introduce rotate immediate instructions

2016-04-01 Thread Naveen N. Rao
c: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/net/bpf_jit.h| 20 +++- 2 files changed, 13 insert

[RFC PATCH 4/6] ppc: bpf/jit: A few cleanups

2016-04-01 Thread Naveen N. Rao
-alignment, per the ISA. Change the macros to use IMM_L(). 4. A few white-space cleanups to satisfy checkpatch.pl. Cc: Matt Evans Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- ar

[RFC PATCH 2/6] ppc: bpf/jit: Optimize 64-bit Immediate loads

2016-04-01 Thread Naveen N. Rao
: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h ind

[RFC PATCH 5/6] ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate header

2016-04-01 Thread Naveen N. Rao
ayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 122 +- arch/powerpc/net/bpf_jit32.h| 140 arch/powerpc/net/bpf_jit_asm.S | 2 +- arch/powerpc/net/bpf_jit_comp.c | 2 +- 4 files changed, 145

[RFC PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-04-01 Thread Naveen N. Rao
. Cc: Matt Evans Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 19 +- arch/powerpc/net/Makefile | 4 + arch/powerpc/net/bpf_j

[RFC PATCH 1/6] ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation

2016-04-01 Thread Naveen N. Rao
we now only need a single LI. The new implementation now generates the same or less number of instructions. Cc: Matt Evans Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/p

[RFC PATCH 0/6] eBPF JIT for PPC64

2016-04-01 Thread Naveen N. Rao
- Naveen Naveen N. Rao (6): ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation ppc: bpf/jit: Optimize 64-bit Immediate loads ppc: bpf/jit: Introduce rotate immediate instructions ppc: bpf/jit: A few cleanups ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate he

Re: [PATCH 3/4] samples/bpf: Simplify building BPF samples

2016-03-31 Thread Naveen N. Rao
On 2016/03/31 10:49AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >Make BPF samples build depend on CONFIG_SAMPLE_BPF. We still don't add a > >Kconfig option since that will add a dependency on llvm for allyesconfig > >builds which may not be d

Re: [PATCH 1/4] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-03-31 Thread Naveen N. Rao
On 2016/03/31 10:43AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >Building BPF samples is failing with the below error: > > > >samples/bpf/map_perf_test_user.c: In function ‘main’: > >samples/bpf/map_perf_test_user.c:134:9: error: variable

[PATCH 1/4] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-03-31 Thread Naveen N. Rao
: Alexei Starovoitov Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- samples/bpf/map_perf_test_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/bpf/map_perf_test_user.c b/samples/bpf/map_perf_test_user.c index 95af56e.

[PATCH 2/4] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-03-31 Thread Naveen N. Rao
While at it, fix some typos in the comment. Cc: Alexei Starovoitov Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- samples/bpf/Makefile | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/samples/bpf

<    1   2   3   4   5   6   7   8   >