[PATCH net-next 1/5] s390/bpf: clear correct BPF accumulator register

2015-07-28 Thread Michael Holzheu
PF_REG_A and BPF_REG_X macros instead of BPF_REG_0/7. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Cc: sta...@vger.kernel.org # 4.0+ Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit_comp.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[PATCH net-next 2/5] s390/bpf: Fix multiple macro expansions

2015-07-28 Thread Michael Holzheu
al times with EMIT_CONST_U64() as "disp" parameter. Therefore always two constants are created per usage of EMIT6_DISP_LH. Fix this and add variable "__disp" to avoid multiple expansions. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-

[PATCH net-next 5/5] s390/bpf: recache skb->data/hlen for skb_vlan_push/pop

2015-07-28 Thread Michael Holzheu
of skb_vlan_push/pop, in the prologue we store the SKB pointer on the stack and restore it after BPF_JMP_CALL to skb_vlan_push/pop. Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit.h | 5 +++- arch/s390/net/bpf_jit_comp.c | 55 ++-- 2 files changed,

[PATCH net-next 4/5] s390/bpf: Only clear A and X for converted BPF programs

2015-07-28 Thread Michael Holzheu
Only classic BPF programs that have been converted to eBPF need to clear the A and X registers. We can check for converted programs with: bpf_prog->type == BPF_PROG_TYPE_UNSPEC So add the check and skip initialization for real eBPF programs. Signed-off-by: Michael Holzheu --- arch/s390/

[PATCH net-next 3/5] s390/bpf: increase BPF_SIZE_MAX

2015-07-28 Thread Michael Holzheu
everywhere 20 bit signed long displacements. Acked-by: Martin Schwidefsky Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit_comp.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index de0f0bc

[PATCH net-next 0/5] s390/bpf: recache skb->data/hlen for skb_vlan_push/pop

2015-07-28 Thread Michael Holzheu
;s "fixes" branch. Ok for you? Regards, Michael Michael Holzheu (5): s390/bpf: clear correct BPF accumulator register s390/bpf: Fix multiple macro expansions s390/bpf: increase BPF_SIZE_MAX s390/bpf: Only clear A and X for converted BPF programs s390/bpf: recache skb->data

Re: [PATCH net-next 2/5] s390/bpf: Fix multiple macro expansions

2015-07-29 Thread Michael Holzheu
On Tue, 28 Jul 2015 20:13:41 -0700 Joe Perches wrote: > On Tue, 2015-07-28 at 16:09 +0200, Michael Holzheu wrote: > > The EMIT6_DISP_LH macro passes the "disp" parameter to the _EMIT6_DISP_LH > > macro. The _EMIT6_DISP_LH macro uses the "disp" parameter twi

[PATCH net-next v2 2/5] s390/bpf: Fix multiple macro expansions

2015-07-29 Thread Michael Holzheu
4623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit_comp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 01ad166..66926ab 100644 -

Re: [PATCH net-next v2 2/5] s390/bpf: Fix multiple macro expansions

2015-07-29 Thread Michael Holzheu
On Wed, 29 Jul 2015 11:31:25 -0700 (PDT) David Miller wrote: > > Please, when updating patches in a series, always resubmit the entire > series not just the patches you want to change. > > Thank you. Sure, I will do that. Sorry for the trouble! Michael -- To unsubscribe from this list: send

[PATCH net-next v2 1/5] s390/bpf: clear correct BPF accumulator register

2015-07-29 Thread Michael Holzheu
PF_REG_A and BPF_REG_X macros instead of BPF_REG_0/7. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Cc: sta...@vger.kernel.org # 4.0+ Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit_comp.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[PATCH net-next v2 2/5] s390/bpf: Fix multiple macro expansions

2015-07-29 Thread Michael Holzheu
4623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit_comp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 01ad166..66926ab 100644 -

[PATCH net-next v2 0/5] s390/bpf: recache skb->data/hlen for skb_vlan_push/pop

2015-07-29 Thread Michael Holzheu
ot;fixes" branch. * v2: Integrated suggestions from Joe Perches Michael Holzheu (5): s390/bpf: clear correct BPF accumulator register s390/bpf: Fix multiple macro expansions s390/bpf: increase BPF_SIZE_MAX s390/bpf: Only clear A and X for converted BPF programs s390/bpf: recache skb->data

[PATCH net-next v2 3/5] s390/bpf: increase BPF_SIZE_MAX

2015-07-29 Thread Michael Holzheu
everywhere 20 bit signed long displacements. Acked-by: Martin Schwidefsky Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit_comp.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 66926ab

[PATCH net-next v2 5/5] s390/bpf: recache skb->data/hlen for skb_vlan_push/pop

2015-07-29 Thread Michael Holzheu
of skb_vlan_push/pop, in the prologue we store the SKB pointer on the stack and restore it after BPF_JMP_CALL to skb_vlan_push/pop. Signed-off-by: Michael Holzheu --- arch/s390/net/bpf_jit.h | 5 +++- arch/s390/net/bpf_jit_comp.c | 55 ++-- 2 files changed,

[PATCH net-next v2 4/5] s390/bpf: Only clear A and X for converted BPF programs

2015-07-29 Thread Michael Holzheu
Only classic BPF programs that have been converted to eBPF need to clear the A and X registers. We can check for converted programs with: bpf_prog->type == BPF_PROG_TYPE_UNSPEC So add the check and skip initialization for real eBPF programs. Signed-off-by: Michael Holzheu --- arch/s390/

[PATCH] samples: bpf: enable trace samples for s390x

2015-07-06 Thread Michael Holzheu
The trace bpf samples do not compile on s390x because they use x86 specific fields from the "pt_regs" structure. Fix this and access the fields via new PT_REGS macros. Signed-off-by: Michael Holzheu --- samples/bpf/bpf_helpers.h | 25 + samples/bpf/tracex1_k

Re: [RFC][PATCH bpf v2 1/2] bpf: allow 64-bit offsets for bpf function calls

2018-02-22 Thread Michael Holzheu
>> xlated prog dump in bpftool, see 'BPF calls via JIT' in 7105e828c087 > >> ("bpf: allow for correlation of maps and helpers in dump"). Any > >> ideas for this (potentially if we could use off + imm for calls, > >> we'd get to 48 bits

Re: [RFC][PATCH bpf v2 1/2] bpf: allow 64-bit offsets for bpf function calls

2018-02-22 Thread Michael Holzheu
Am Thu, 22 Feb 2018 13:06:40 +0100 schrieb Michael Holzheu : > Am Fri, 16 Feb 2018 21:20:09 +0530 > schrieb "Naveen N. Rao" : > > > Daniel Borkmann wrote: > > > On 02/15/2018 05:25 PM, Daniel Borkmann wrote: > > >> On 02/13/2018 05:05 AM, Sandipan

Re: [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context

2018-01-09 Thread Michael Holzheu
Am Thu, 14 Dec 2017 21:07:23 +0100 schrieb Daniel Borkmann : > The assumption of unconditionally reloading skb pointers on > BPF helper calls where bpf_helper_changes_pkt_data() holds > true is wrong. There can be different contexts where the > BPF helper would enforce a reload such as in case of

Re: [PATCH bpf-next 07/13] bpf, s390x: remove obsolete exception handling from div/mod

2018-01-29 Thread Michael Holzheu
-by: Daniel Borkmann > Cc: Michael Holzheu > --- > arch/s390/net/bpf_jit_comp.c | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c > index e501887..78a19c9 100644 > --- a/arch/s390/net/bpf_jit

[PATCH] bpf/samples: Fix PT_REGS_IP on s390x and use it

2016-11-28 Thread Michael Holzheu
The files "sampleip_kern.c" and "trace_event_kern.c" directly access "ctx->regs.ip" which is not available on s390x. Fix this and use the PT_REGS_IP() macro instead. Also fix the macro for s390x and use "psw.addr" from "pt_regs". Reported-by

Re: [PATCH net 1/2] bpf, s390: fix jit branch offset related to ldimm64

2017-08-04 Thread Michael Holzheu
Am Fri, 04 Aug 2017 15:52:47 +0200 schrieb Daniel Borkmann : > On 08/04/2017 03:44 PM, Michael Holzheu wrote: > > Am Fri, 4 Aug 2017 14:20:54 +0200 > > schrieb Daniel Borkmann : > [...] > > > > What about "Cc: sta...@vger.kernel.org"? > > Handl

Re: [PATCH net 1/2] bpf, s390: fix jit branch offset related to ldimm64

2017-08-04 Thread Michael Holzheu
3df0: e3b0f074 lg %r11,112(%r15) > 03ff80ef3df6: e3e0f0880004 lg %r14,136(%r15) > 03ff80ef3dfc: 07fe bcr 15,%r14 > > test_bpf.ko suite runs fine after the fix. > > Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") > Signed-off-by: Daniel Borkmann > Tested-by: Michael Holzheu What about "Cc: sta...@vger.kernel.org"? Michael