Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Hi David, On Tue, Aug 22, 2017 at 10:02 PM, David Miller wrote: > > You posted this 4 times. :-( > > I hope I applied the right one. All 4 of these are the same patch. I mistakenly sent it 4 times. My apologies for that. > > Go check net-next and please send me any

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Hi David, On Tue, Aug 22, 2017 at 10:02 PM, David Miller wrote: > > You posted this 4 times. :-( > > I hope I applied the right one. All 4 of these are the same patch. I mistakenly sent it 4 times. My apologies for that. > > Go check net-next and please send me any necessary fix up patches. I

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Please ignore this mail. Sent it by mistake. Sent the correct patch later on.

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Please ignore this mail. Sent it by mistake. Sent the correct patch later on.

Re: [PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Please ignore this mail. Sent it by mistake.

Re: [PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Please ignore this mail. Sent it by mistake.

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Russell, David, Alexei, Daniel and Kees. Please check this patch and lets finish it. Thanks.

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
Russell, David, Alexei, Daniel and Kees. Please check this patch and lets finish it. Thanks.

[PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

[PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread Shubham Bansal
space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0

Re: events: possible deadlock in __perf_event_task_sched_out

2017-08-21 Thread Shubham Bansal
> This is a WARN, printk is a pig. So, its not a bug?

Re: events: possible deadlock in __perf_event_task_sched_out

2017-08-21 Thread Shubham Bansal
> This is a WARN, printk is a pig. So, its not a bug?

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-20 Thread Shubham Bansal
> With the below #ifdef __LITTLE_ENDIAN spanning the entire > bpf_int_jit_compile(), a user can then enable and compile > eBPF JIT for big endian, even set the bpf_jit_enable to 1 > to turn it on, but it won't JIT anything, which is contrary > to the expectation. > > This should rather be a hard

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-20 Thread Shubham Bansal
> With the below #ifdef __LITTLE_ENDIAN spanning the entire > bpf_int_jit_compile(), a user can then enable and compile > eBPF JIT for big endian, even set the bpf_jit_enable to 1 > to turn it on, but it won't JIT anything, which is contrary > to the expectation. > > This should rather be a hard

events: possible deadlock in __perf_event_task_sched_out

2017-08-20 Thread Shubham Bansal
Hi all, While fuzzing with syzkaller inside Qemu I've stumbled on the following warning which is reproducible with == // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include

events: possible deadlock in __perf_event_task_sched_out

2017-08-20 Thread Shubham Bansal
Hi all, While fuzzing with syzkaller inside Qemu I've stumbled on the following warning which is reproducible with == // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-20 Thread Shubham Bansal
> Acked-by: Alexei Starovoitov David, Russell, Kees and Daniel, Anything from your side? Is this patch ready to land in net-next?

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-20 Thread Shubham Bansal
> Acked-by: Alexei Starovoitov David, Russell, Kees and Daniel, Anything from your side? Is this patch ready to land in net-next?

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
total map id found by get_next_id 0 nsec test_pkt_md_access:PASS: 30459 nsec<--- Here is the difference. Summary: 30 PASSED, 0 FAILED On Sun, Aug 20, 2017 at 2:58 AM, Shubham Bansal <illusionist@gmail.com> wrote: > Here are numbers. > > Without any JIT enabled >

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
total map id found by get_next_id 0 nsec test_pkt_md_access:PASS: 30459 nsec<--- Here is the difference. Summary: 30 PASSED, 0 FAILED On Sun, Aug 20, 2017 at 2:58 AM, Shubham Bansal wrote: > Here are numbers. > > Without any JIT enabled > > test_pkt_access:PASS:ipv4 1823 n

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
Here are numbers. Without any JIT enabled test_pkt_access:PASS:ipv4 1823 nsec test_pkt_access:PASS:ipv6 1743 nsec test_xdp:PASS:ipv4 769022 nsec test_xdp:PASS:ipv6 15408 nsec test_l4lb:PASS:ipv4 12441 nsec test_l4lb:PASS:ipv6 18131 nsec test_tcp_estats:PASS: 0 nsec

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
Here are numbers. Without any JIT enabled test_pkt_access:PASS:ipv4 1823 nsec test_pkt_access:PASS:ipv6 1743 nsec test_xdp:PASS:ipv4 769022 nsec test_xdp:PASS:ipv6 15408 nsec test_l4lb:PASS:ipv4 12441 nsec test_l4lb:PASS:ipv6 18131 nsec test_tcp_estats:PASS: 0 nsec

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
One more thing I forgot to mention. I think this is the first implementation of eBPF JIT on any 32 bit arch, correct me if I am wrong. I think we can use this as a POC to implement eBPF on other 32 bit arch as well like x86, depends on its need I guess.

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
One more thing I forgot to mention. I think this is the first implementation of eBPF JIT on any 32 bit arch, correct me if I am wrong. I think we can use this as a POC to implement eBPF on other 32 bit arch as well like x86, depends on its need I guess.

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
> impressive work. > Acked-by: Alexei Starovoitov Thanks :) I can't take all the credit. It was Daniel and Kees who helped me a lot. I would have given up a long time ago without them. > > Any performance numbers with vs without JIT ? Here is the mail from Kees on v1 of the

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
> impressive work. > Acked-by: Alexei Starovoitov Thanks :) I can't take all the credit. It was Daniel and Kees who helped me a lot. I would have given up a long time ago without them. > > Any performance numbers with vs without JIT ? Here is the mail from Kees on v1 of the patch. For what

[PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
htab inlining more robust wrt assumptions" with message ID: 03f4e86a029058d0f674fd9bf288e55a5ec07df3.1503104831.git.dan...@iogearbox.net Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0 FAILED, [312/333 JIT'ed] 2) test_tag: OK (4094

[PATCH net-next v3] arm: eBPF JIT compiler

2017-08-19 Thread Shubham Bansal
htab inlining more robust wrt assumptions" with message ID: 03f4e86a029058d0f674fd9bf288e55a5ec07df3.1503104831.git.dan...@iogearbox.net Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0 FAILED, [312/333 JIT'ed] 2) test_tag: OK (4094

Re: [PATCH v2] arm: eBPF JIT compiler

2017-07-06 Thread Shubham Bansal
Okay Kees. I will take a look at it. Best, Shubham Bansal On Fri, Jul 7, 2017 at 10:12 AM, Kees Cook <keesc...@chromium.org> wrote: > On Wed, Jul 5, 2017 at 8:49 PM, Shubham Bansal > <illusionist@gmail.com> wrote: >> Hi Kees, >> >> Problem is my ARM m

Re: [PATCH v2] arm: eBPF JIT compiler

2017-07-06 Thread Shubham Bansal
Okay Kees. I will take a look at it. Best, Shubham Bansal On Fri, Jul 7, 2017 at 10:12 AM, Kees Cook wrote: > On Wed, Jul 5, 2017 at 8:49 PM, Shubham Bansal > wrote: >> Hi Kees, >> >> Problem is my ARM machine don't have clang and iproute2 which is >> keeping me f

Re: [PATCH v2] arm: eBPF JIT compiler

2017-07-05 Thread Shubham Bansal
Hi Kees, Problem is my ARM machine don't have clang and iproute2 which is keeping me from testing the bpf tail calls. You should do the following to test it,. 1. tools/testing/selftests/bpf/ 2. make 3. sudo ./test_progs And, before testing, you have to do "make headers_install". These tests

Re: [PATCH v2] arm: eBPF JIT compiler

2017-07-05 Thread Shubham Bansal
Hi Kees, Problem is my ARM machine don't have clang and iproute2 which is keeping me from testing the bpf tail calls. You should do the following to test it,. 1. tools/testing/selftests/bpf/ 2. make 3. sudo ./test_progs And, before testing, you have to do "make headers_install". These tests

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-23 Thread Shubham Bansal
Hi Russell,Daniel and Kees, I am attaching the latest patch with this mail. It included support for BPF_CALL | BPF_JMP tested with and without constant blinding on ARMv7 machine. Due to the limitation on my machine I can't test the tail call. It would be a great help if any of you could help me

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-23 Thread Shubham Bansal
Hi Russell,Daniel and Kees, I am attaching the latest patch with this mail. It included support for BPF_CALL | BPF_JMP tested with and without constant blinding on ARMv7 machine. Due to the limitation on my machine I can't test the tail call. It would be a great help if any of you could help me

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-21 Thread Shubham Bansal
, if not, then do let me know what more is required? Best, Shubham Bansal On Wed, Jun 21, 2017 at 10:02 PM, Daniel Borkmann <dan...@iogearbox.net> wrote: > On 06/21/2017 04:26 PM, Shubham Bansal wrote: > [...] >> >> So ultimately, we call helper_function which takes u64 as arguments &g

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-21 Thread Shubham Bansal
, if not, then do let me know what more is required? Best, Shubham Bansal On Wed, Jun 21, 2017 at 10:02 PM, Daniel Borkmann wrote: > On 06/21/2017 04:26 PM, Shubham Bansal wrote: > [...] >> >> So ultimately, we call helper_function which takes u64 as arguments >> only. I know its a

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-21 Thread Shubham Bansal
Hi Daniel, > > So my question would be, why can't the JIT imitate something > similar to what we do in the interpreter as well? So looking > at the disasm of what gcc compiles for the interpreter when it's > doing the above call could help as well in going forward. Not > sure if that answers your

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-21 Thread Shubham Bansal
Hi Daniel, > > So my question would be, why can't the JIT imitate something > similar to what we do in the interpreter as well? So looking > at the disasm of what gcc compiles for the interpreter when it's > doing the above call could help as well in going forward. Not > sure if that answers your

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-19 Thread Shubham Bansal
Hi Daniel, > > Sorry, had a travel over the weekend, so didn't read it in time. > > What is the issue with imitating in JIT what the interpreter is > doing as a starting point? That should be generic enough to handle > any case. > > Otherwise you'd need some sort of reverse mapping since verifier

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-19 Thread Shubham Bansal
Hi Daniel, > > Sorry, had a travel over the weekend, so didn't read it in time. > > What is the issue with imitating in JIT what the interpreter is > doing as a starting point? That should be generic enough to handle > any case. > > Otherwise you'd need some sort of reverse mapping since verifier

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-17 Thread Shubham Bansal
Hi Daniel, > > Not all of the helpers have 4 or less byte arguments only, there are a > few with 8 byte arguments, so making that general assumption wouldn't > work. I guess what could be done is that helpers have a flag in struct > bpf_func_proto which indicates for JITs that all args are 4 byte

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-17 Thread Shubham Bansal
Hi Daniel, > > Not all of the helpers have 4 or less byte arguments only, there are a > few with 8 byte arguments, so making that general assumption wouldn't > work. I guess what could be done is that helpers have a flag in struct > bpf_func_proto which indicates for JITs that all args are 4 byte

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-13 Thread Shubham Bansal
Hi Daniel, Kees, David, Russel, >> Any plans to implement above especially BPF_JMP | BPF_CALL in near future? >> Reason why I'm asking is that i) currently the arm32 cBPF JIT implements >> all of the cBPF extensions (except SKF_AD_RANDOM and SKF_AD_VLAN_TPID). >> Some of the programs that were

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-13 Thread Shubham Bansal
Hi Daniel, Kees, David, Russel, >> Any plans to implement above especially BPF_JMP | BPF_CALL in near future? >> Reason why I'm asking is that i) currently the arm32 cBPF JIT implements >> all of the cBPF extensions (except SKF_AD_RANDOM and SKF_AD_VLAN_TPID). >> Some of the programs that were

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-12 Thread Shubham Bansal
Hi Russel, On Mon, Jun 12, 2017 at 4:36 PM, Russell King - ARM Linux <li...@armlinux.org.uk> wrote: > On Mon, Jun 12, 2017 at 12:21:03PM +0200, Daniel Borkmann wrote: >> On 05/30/2017 09:19 PM, Kees Cook wrote: >> >On Thu, May 25, 2017 at 4:13 PM, Shubham Bansal >&g

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-12 Thread Shubham Bansal
Hi Russel, On Mon, Jun 12, 2017 at 4:36 PM, Russell King - ARM Linux wrote: > On Mon, Jun 12, 2017 at 12:21:03PM +0200, Daniel Borkmann wrote: >> On 05/30/2017 09:19 PM, Kees Cook wrote: >> >On Thu, May 25, 2017 at 4:13 PM, Shubham Bansal >> > wrote: >> >>+

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-12 Thread Shubham Bansal
gt;> Implementation is using scratch space to emulate 64 bit eBPF ISA on 32 >>> bit >>> ARM because of deficiency of general purpose registers on ARM. Currently, >>> only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. >>> >>> Teste

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-12 Thread Shubham Bansal
is using scratch space to emulate 64 bit eBPF ISA on 32 >>> bit >>> ARM because of deficiency of general purpose registers on ARM. Currently, >>> only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. >>> >>> Tested on ARMv7 with QEMU

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-06 Thread Shubham Bansal
Hi Russell, Alexei, David, Daniel, kees, Any update on this patch moving forward? Best, Shubham Bansal On Wed, May 31, 2017 at 12:49 AM, Kees Cook <keesc...@chromium.org> wrote: > Forwarding this to net-dev and eBPF folks, who weren't on CC... > > -Kees > > On Thu, Ma

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-06 Thread Shubham Bansal
Hi Russell, Alexei, David, Daniel, kees, Any update on this patch moving forward? Best, Shubham Bansal On Wed, May 31, 2017 at 12:49 AM, Kees Cook wrote: > Forwarding this to net-dev and eBPF folks, who weren't on CC... > > -Kees > > On Thu, May 25, 2017 at 4:13 PM, Shubham

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-30 Thread Shubham Bansal
need it. I guess, it was a wasted effort. I don't have anything more to offer in regarding to this patch. Thank you. Best, Shubham Bansal On Fri, May 26, 2017 at 10:27 PM, Shubham Bansal <illusionist@gmail.com> wrote: > Hi Andrew, > > Did you get the time t

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-30 Thread Shubham Bansal
need it. I guess, it was a wasted effort. I don't have anything more to offer in regarding to this patch. Thank you. Best, Shubham Bansal On Fri, May 26, 2017 at 10:27 PM, Shubham Bansal wrote: > Hi Andrew, > > Did you get the time to test the code with CONFIG_FRAME_POINTER? It > wo

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-26 Thread Shubham Bansal
Hi Andrew, Did you get the time to test the code with CONFIG_FRAME_POINTER? It would be great if you could check if it works on ARMv5 so that Russell can look at the patch. Thanks. Best, Shubham Bansal On Fri, May 26, 2017 at 5:06 AM, Shubham Bansal <illusionist@gmail.com> wrote:

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-26 Thread Shubham Bansal
Hi Andrew, Did you get the time to test the code with CONFIG_FRAME_POINTER? It would be great if you could check if it works on ARMv5 so that Russell can look at the patch. Thanks. Best, Shubham Bansal On Fri, May 26, 2017 at 5:06 AM, Shubham Bansal wrote: > Just to add. It a very very sm

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Just to add. It a very very small part which deal with CONFIG_FRAME_POINTER just one move instruction. Best, Shubham Bansal On Fri, May 26, 2017 at 5:04 AM, Shubham Bansal <illusionist@gmail.com> wrote: > Hi Andrew, > > Oh. I didn't knew. Can you test it now and conf

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Just to add. It a very very small part which deal with CONFIG_FRAME_POINTER just one move instruction. Best, Shubham Bansal On Fri, May 26, 2017 at 5:04 AM, Shubham Bansal wrote: > Hi Andrew, > > Oh. I didn't knew. Can you test it now and confirm it? I think it will > work and w

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, Oh. I didn't knew. Can you test it now and confirm it? I think it will work and wouldn't take much of the time. Please. Best, Shubham Bansal On Fri, May 26, 2017 at 4:53 AM, Andrew Lunn <and...@lunn.ch> wrote: >> Tested on ARMv7 with QEMU by me (Shubham Bansal). >&g

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, Oh. I didn't knew. Can you test it now and confirm it? I think it will work and wouldn't take much of the time. Please. Best, Shubham Bansal On Fri, May 26, 2017 at 4:53 AM, Andrew Lunn wrote: >> Tested on ARMv7 with QEMU by me (Shubham Bansal). >> Tested on ARMv5 by

[PATCH v2] arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Implementation is using scratch space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Tested on ARMv5 by Andrew Lunn

[PATCH v2] arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Implementation is using scratch space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Tested on ARMv5 by Andrew Lunn

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
-ca9.dtb -kernel ./linux/arch/arm/boot/zImage -append "root=/dev/mmcblk0 console=ttyAMA0" -sd ./a9rootfs.ext3 --nographic Which machine I should use for ARMv6 in QEMU. Which dtb file I should use for ? All these questions I have. If anybody knows please let me know. Best, Shubham Bansa

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
-ca9.dtb -kernel ./linux/arch/arm/boot/zImage -append "root=/dev/mmcblk0 console=ttyAMA0" -sd ./a9rootfs.ext3 --nographic Which machine I should use for ARMv6 in QEMU. Which dtb file I should use for ? All these questions I have. If anybody knows please let me know. Best, Shubham Bansa

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, On Fri, May 26, 2017 at 12:18 AM, Andrew Lunn <and...@lunn.ch> wrote: > On Fri, May 26, 2017 at 12:05:23AM +0530, Shubham Bansal wrote: >> Hi Andrew, >> >> My Apologies. >> >> I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, On Fri, May 26, 2017 at 12:18 AM, Andrew Lunn wrote: > On Fri, May 26, 2017 at 12:05:23AM +0530, Shubham Bansal wrote: >> Hi Andrew, >> >> My Apologies. >> >> I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the >> ARMv6 machine

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, My Apologies. I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the ARMv6 machine you can test it on? -Shubham

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, My Apologies. I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the ARMv6 machine you can test it on? -Shubham

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, Did you get the chance to test the patch? Best, Shubham Bansal On Thu, May 25, 2017 at 2:01 AM, Shubham Bansal <illusionist@gmail.com> wrote: > Hi Andrew, > > I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. > > Please test on you

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, Did you get the chance to test the patch? Best, Shubham Bansal On Thu, May 25, 2017 at 2:01 AM, Shubham Bansal wrote: > Hi Andrew, > > I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. > > Please test on your machines. Apologies for

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-24 Thread Shubham Bansal
Hi Andrew, I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. Please test on your machines. Apologies for the last patch. This patch should work though. Best, Shubham Bansal On Wed, May 24, 2017 at 4:55 AM, Andrew Lunn <and...@lunn.ch> wrote: > root@qnap:~#

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-24 Thread Shubham Bansal
Hi Andrew, I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. Please test on your machines. Apologies for the last patch. This patch should work though. Best, Shubham Bansal On Wed, May 24, 2017 at 4:55 AM, Andrew Lunn wrote: > root@qnap:~# test_bpf: #0 TAX jite

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Andrew, I am attaching the additional patch to make it work for ARMv5 as well. Let me know if you find any issues with this. Please apply 0002-Editted-for-ARMv5-compilation.patch after applying the first patch. Best, Shubham Bansal On Wed, May 24, 2017 at 2:16 AM, Andrew Lunn

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Andrew, I am attaching the additional patch to make it work for ARMv5 as well. Let me know if you find any issues with this. Please apply 0002-Editted-for-ARMv5-compilation.patch after applying the first patch. Best, Shubham Bansal On Wed, May 24, 2017 at 2:16 AM, Andrew Lunn wrote

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Andrew, I think I forgot to compile it for ARMv5. Let me send the patch again in few minutes. I appreciate the help. Best, Shubham Bansal On Wed, May 24, 2017 at 2:16 AM, Andrew Lunn <and...@lunn.ch> wrote: > On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: &

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Andrew, I think I forgot to compile it for ARMv5. Let me send the patch again in few minutes. I appreciate the help. Best, Shubham Bansal On Wed, May 24, 2017 at 2:16 AM, Andrew Lunn wrote: > On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: >> The JIT compiler emi

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Russell, On Wed, May 24, 2017 at 12:30 AM, Russell King - ARM Linux <li...@armlinux.org.uk> wrote: > Hi, > > On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: >> The JIT compiler emits ARM 32 bit instructions. Currently, It supports >> eBPF only. Class

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Russell, On Wed, May 24, 2017 at 12:30 AM, Russell King - ARM Linux wrote: > Hi, > > On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: >> The JIT compiler emits ARM 32 bit instructions. Currently, It supports >> eBPF only. Classic BPF is supported beca

[PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
V | BPF_K BPF_ALU64 | BPF_DIV | BPF_X BPF_ALU64 | BPF_MOD | BPF_K BPF_ALU64 | BPF_MOD | BPF_X BPF_STX | BPF_XADD | BPF_W BPF_STX | BPF_XADD | BPF_DW BPF_JMP | BPF_CALL Signed-off-by: Shubham Bansal <illusionist@gmail.com> --- arch/arm/n

[PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
V | BPF_K BPF_ALU64 | BPF_DIV | BPF_X BPF_ALU64 | BPF_MOD | BPF_K BPF_ALU64 | BPF_MOD | BPF_X BPF_STX | BPF_XADD | BPF_W BPF_STX | BPF_XADD | BPF_DW BPF_JMP | BPF_CALL Signed-off-by: Shubham Bansal --- arch/arm/net/bpf_jit_32

[PATCH] Staging: android: ion: fixed a kzalloc coding style issue.

2016-05-26 Thread Shubham Bansal
Fixed a coding style issue. Issue reported by checkpatch.pl. Signed-off-by: Shubham Bansal <illusionist@gmail.com> --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion

[PATCH] Staging: android: ion: fixed a kzalloc coding style issue.

2016-05-26 Thread Shubham Bansal
Fixed a coding style issue. Issue reported by checkpatch.pl. Signed-off-by: Shubham Bansal --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 8536567..2217ccb

[PATCH] Staging: android: ion: fixed a kzalloc coding style issue.

2016-05-14 Thread Shubham Bansal
Fixed a coding style issue. Issue reported by checkpatch.pl. Signed-off-by: Shubham Bansal <illusionist@gmail.com> --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion

[PATCH] Staging: android: ion: fixed a kzalloc coding style issue.

2016-05-14 Thread Shubham Bansal
Fixed a coding style issue. Issue reported by checkpatch.pl. Signed-off-by: Shubham Bansal --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 8536567..2217ccb