Thread (42 messages) flat view 42 messages, 4 authors, 2014-09-17

Re: [PATCH v11 net-next 11/12] net: filter: move eBPF instruction macros

From: Daniel Borkmann <hidden>
Date: 2014-09-11 06:30:27
Also in: linux-api, lkml

On 09/10/2014 08:16 PM, Alexei Starovoitov wrote:
On Wed, Sep 10, 2014 at 4:24 AM, Daniel Borkmann [off-list ref] wrote:
quoted
On 09/10/2014 07:10 AM, Alexei Starovoitov wrote:
quoted
move instruction macros (like BPF_MOV64_REG or BPF_ALU32_IMM)
from linux/filter.h into uapi/linux/bpf.h
so that userspace programs can use them.

verifier testsuite (in later patches) will be using them.

Signed-off-by: Alexei Starovoitov <redacted>
I don't think we need this commit at all. These macros are not really
part of the ABI and we should expose __as less as possible__, otherwise
we won't be able to alter them anymore. Plus, based on your previous
argumentation regarding the header file expose, we also won't be able
to add any new macros anymore since you could run into name collisions.

Anyway, I don't see a reason why a e.g. central user space eBPF library
cannot live with, for example, a private copy of these helper macros or
whatever it wants to define by itself.

I know in classic BPF there's BPF_STMT() and BPF_JUMP() but it's much
less complicated than eBPF and less likely to changes.
Interesting idea. Are you saying just copy paste these
226 lines into user libbpf.h for now to use them in testsuite
and examples ? Hmm.
Indeed the less lines we add to uapi the better. I'll do that.
Yes, that should be just fine, the existing ABI is not allowed to
change anyway and we're running into less pain if we decide to change
existing or add new macros internally.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help