OpenCloudOS-Kernel/kernel/bpf
Alexei Starovoitov d691f9e8d4 bpf: allow programs to write to certain skb fields
allow programs read/write skb->mark, tc_index fields and
((struct qdisc_skb_cb *)cb)->data.

mark and tc_index are generically useful in TC.
cb[0]-cb[4] are primarily used to pass arguments from one
program to another called via bpf_tail_call() which can
be seen in sockex3_kern.c example.

All fields of 'struct __sk_buff' are readable to socket and tc_cls_act progs.
mark, tc_index are writeable from tc_cls_act only.
cb[0]-cb[4] are writeable by both sockets and tc_cls_act.

Add verifier tests and improve sample code.

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-07 02:01:33 -07:00
..
Makefile ebpf: remove kernel test stubs 2015-03-01 14:05:18 -05:00
arraymap.c bpf: add missing rcu protection when releasing programs from prog_array 2015-05-31 00:27:51 -07:00
core.c ebpf: misc core cleanup 2015-05-31 21:44:44 -07:00
hashtab.c ebpf: constify various function pointer structs 2015-03-01 14:05:18 -05:00
helpers.c ebpf: misc core cleanup 2015-05-31 21:44:44 -07:00
syscall.c bpf: add missing rcu protection when releasing programs from prog_array 2015-05-31 00:27:51 -07:00
verifier.c bpf: allow programs to write to certain skb fields 2015-06-07 02:01:33 -07:00