Thread (30 messages) flat view 30 messages, 6 authors, 2015-10-08

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

From: Alexei Starovoitov <hidden>
Date: 2015-10-06 19:26:59
Also in: lkml, netdev

On 10/6/15 10:56 AM, Eric Dumazet wrote:
On Tue, 2015-10-06 at 10:50 -0700, Alexei Starovoitov wrote:
quoted
was also thinking that we can do it only in paths that actually
have multiple protocol layers, since today bpf is mainly used with
tcpdump(raw_socket) and new af_packet fanout both have cb cleared
on RX, because it just came out of alloc_skb and no layers were called,
and on TX we can clear 20 bytes in dev_queue_xmit_nit().
af_unix/netlink also have clean skb. Need to analyze tun and sctp...
but it feels overly fragile to save a branch in sk_filter,
so planning to go with
if(unlikely(prog->cb_access)) memset in sk_filter().
This will break TCP use of sk_filter().
skb->cb[] contains useful data in TCP layer.
oops. thanks for catching. In case of sk_filter on top of tcp sock,
it shouldn't be looking at cb at all.
I'm thinking to send a patch to get rid of cb access for socket filters
all together until better solution found.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help