bpf: wire in data and data_end for cls_act_bpf
authorAlexei Starovoitov <ast@fb.com>
Fri, 6 May 2016 02:49:12 +0000 (19:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 May 2016 20:01:54 +0000 (16:01 -0400)
commitdb58ba45920255e967cc1d62a430cebd634b5046
tree6249362f507db4d022929e61069ca3742ab569ef
parent735b433397ea2f97d59240cbe4ea770aa7c88eef
bpf: wire in data and data_end for cls_act_bpf

allow cls_bpf and act_bpf programs access skb->data and skb->data_end pointers.
The bpf helpers that change skb->data need to update data_end pointer as well.
The verifier checks that programs always reload data, data_end pointers
after calls to such bpf helpers.
We cannot add 'data_end' pointer to struct qdisc_skb_cb directly,
since it's embedded as-is by infiniband ipoib, so wrapper struct is needed.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/filter.h
net/core/filter.c
net/sched/act_bpf.c
net/sched/cls_bpf.c