linux/samples/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
..
bpf_helpers.h samples/bpf: bpf_tail_call example for networking 2015-05-21 17:07:59 -04:00
bpf_load.c samples/bpf: bpf_tail_call example for tracing 2015-05-21 17:07:59 -04:00
bpf_load.h samples/bpf: Add simple non-portable kprobe filter example 2015-04-02 13:25:50 +02:00
libbpf.c samples/bpf: Add simple non-portable kprobe filter example 2015-04-02 13:25:50 +02:00
libbpf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
Makefile samples/bpf: bpf_tail_call example for networking 2015-05-21 17:07:59 -04:00
sock_example.c samples/bpf: Add simple non-portable kprobe filter example 2015-04-02 13:25:50 +02:00
sockex1_kern.c samples: bpf: add skb->field examples and tests 2015-03-15 22:02:28 -04:00
sockex1_user.c samples: bpf: add skb->field examples and tests 2015-03-15 22:02:28 -04:00
sockex2_kern.c samples: bpf: add skb->field examples and tests 2015-03-15 22:02:28 -04:00
sockex2_user.c samples: bpf: add skb->field examples and tests 2015-03-15 22:02:28 -04:00
sockex3_kern.c bpf: allow programs to write to certain skb fields 2015-06-07 02:01:33 -07:00
sockex3_user.c samples/bpf: bpf_tail_call example for networking 2015-05-21 17:07:59 -04:00
tcbpf1_kern.c bpf: make programs see skb->data == L2 for ingress and egress 2015-06-07 02:01:33 -07:00
test_maps.c samples: bpf: relax test_maps check 2015-01-26 17:20:40 -08:00
test_verifier.c bpf: allow programs to write to certain skb fields 2015-06-07 02:01:33 -07:00
tracex1_kern.c samples/bpf: Add simple non-portable kprobe filter example 2015-04-02 13:25:50 +02:00
tracex1_user.c samples/bpf: Add simple non-portable kprobe filter example 2015-04-02 13:25:50 +02:00
tracex2_kern.c samples/bpf: Add counting example for kfree_skb() function calls and the write() syscall 2015-04-02 13:25:50 +02:00
tracex2_user.c samples/bpf: Add counting example for kfree_skb() function calls and the write() syscall 2015-04-02 13:25:50 +02:00
tracex3_kern.c samples/bpf: Add IO latency analysis (iosnoop/heatmap) tool 2015-04-02 13:25:51 +02:00
tracex3_user.c samples/bpf: Add IO latency analysis (iosnoop/heatmap) tool 2015-04-02 13:25:51 +02:00
tracex4_kern.c samples/bpf: Add kmem_alloc()/free() tracker tool 2015-04-02 13:25:51 +02:00
tracex4_user.c samples/bpf: Add kmem_alloc()/free() tracker tool 2015-04-02 13:25:51 +02:00
tracex5_kern.c samples/bpf: bpf_tail_call example for tracing 2015-05-21 17:07:59 -04:00
tracex5_user.c samples/bpf: bpf_tail_call example for tracing 2015-05-21 17:07:59 -04:00