Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-03-03 Thread Alexei Starovoitov
On Mon, Mar 3, 2014 at 2:05 AM, Hagen Paul Pfeifer wrote: > * Daniel Borkmann | 2014-03-01 01:30:00 [+0100]: > as in 'struct bpf_insn' the immediate value is 32 bit, so for 64 bit comparisons, you'd still need to load to immediate values, right? >>> >>>there is no insn that use 64-bit

Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-03-03 Thread Hagen Paul Pfeifer
* Daniel Borkmann | 2014-03-01 01:30:00 [+0100]: >>>as in 'struct bpf_insn' the immediate value is 32 bit, so for 64 bit >>>comparisons, you'd still need to load to immediate values, right? >> >>there is no insn that use 64-bit immediate, since 64-bit immediates >>are extremely rare. grep x86-64

Re: [PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-03-03 Thread Hagen Paul Pfeifer
* Daniel Borkmann | 2014-03-01 01:30:00 [+0100]: as in 'struct bpf_insn' the immediate value is 32 bit, so for 64 bit comparisons, you'd still need to load to immediate values, right? there is no insn that use 64-bit immediate, since 64-bit immediates are extremely rare. grep x86-64 asm code for

Re: [PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-03-03 Thread Alexei Starovoitov
On Mon, Mar 3, 2014 at 2:05 AM, Hagen Paul Pfeifer ha...@jauu.net wrote: * Daniel Borkmann | 2014-03-01 01:30:00 [+0100]: as in 'struct bpf_insn' the immediate value is 32 bit, so for 64 bit comparisons, you'd still need to load to immediate values, right? there is no insn that use 64-bit

Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Daniel Borkmann
On 02/28/2014 09:53 PM, Alexei Starovoitov wrote: On Fri, Feb 28, 2014 at 4:45 AM, Daniel Borkmann wrote: ... Did you also test that seccomp-BPF still works out? yes. Have a prototype, but it needs a bit more cleanup. Here's [1] actually some code snippet for user space for prctl(). The

Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Alexei Starovoitov
On Fri, Feb 28, 2014 at 12:53 PM, Alexei Starovoitov wrote: > On Fri, Feb 28, 2014 at 4:45 AM, Daniel Borkmann wrote: >> Hi Alexei, >> >> [also cc'ing Hagen and Jesse] >> >> Just some minor comments below ... let me know what you think. > > Thank you for review! Comments below. > >> On

Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Alexei Starovoitov
On Fri, Feb 28, 2014 at 4:45 AM, Daniel Borkmann wrote: > Hi Alexei, > > [also cc'ing Hagen and Jesse] > > Just some minor comments below ... let me know what you think. Thank you for review! Comments below. > On 02/27/2014 03:38 AM, Alexei Starovoitov wrote: >> >> Extended BPF (or 64-bit BPF)

Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Daniel Borkmann
Hi Alexei, [also cc'ing Hagen and Jesse] Just some minor comments below ... let me know what you think. On 02/27/2014 03:38 AM, Alexei Starovoitov wrote: Extended BPF (or 64-bit BPF) is an instruction set to create safe dynamically loadable filters that can call fixed set of kernel functions

Re: [PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Daniel Borkmann
Hi Alexei, [also cc'ing Hagen and Jesse] Just some minor comments below ... let me know what you think. On 02/27/2014 03:38 AM, Alexei Starovoitov wrote: Extended BPF (or 64-bit BPF) is an instruction set to create safe dynamically loadable filters that can call fixed set of kernel functions

Re: [PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Alexei Starovoitov
On Fri, Feb 28, 2014 at 4:45 AM, Daniel Borkmann dbork...@redhat.com wrote: Hi Alexei, [also cc'ing Hagen and Jesse] Just some minor comments below ... let me know what you think. Thank you for review! Comments below. On 02/27/2014 03:38 AM, Alexei Starovoitov wrote: Extended BPF (or

Re: [PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Alexei Starovoitov
On Fri, Feb 28, 2014 at 12:53 PM, Alexei Starovoitov a...@plumgrid.com wrote: On Fri, Feb 28, 2014 at 4:45 AM, Daniel Borkmann dbork...@redhat.com wrote: Hi Alexei, [also cc'ing Hagen and Jesse] Just some minor comments below ... let me know what you think. Thank you for review! Comments

Re: [PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-02-28 Thread Daniel Borkmann
On 02/28/2014 09:53 PM, Alexei Starovoitov wrote: On Fri, Feb 28, 2014 at 4:45 AM, Daniel Borkmann dbork...@redhat.com wrote: ... Did you also test that seccomp-BPF still works out? yes. Have a prototype, but it needs a bit more cleanup. Here's [1] actually some code snippet for user space

[PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter

2014-02-26 Thread Alexei Starovoitov
Extended BPF (or 64-bit BPF) is an instruction set to create safe dynamically loadable filters that can call fixed set of kernel functions and take generic bpf_context as an input. BPF filter is a glue between kernel functions and bpf_context. Different kernel subsystems can define their own set

[PATCH v3 net-next 1/1] bpf32-bpf64 mapper and bpf64 interpreter

2014-02-26 Thread Alexei Starovoitov
Extended BPF (or 64-bit BPF) is an instruction set to create safe dynamically loadable filters that can call fixed set of kernel functions and take generic bpf_context as an input. BPF filter is a glue between kernel functions and bpf_context. Different kernel subsystems can define their own set