Re: [PATCH v3 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-17 Thread Song Liu
> On Oct 17, 2018, at 11:25 PM, Alexei Starovoitov > wrote: > > On Wed, Oct 17, 2018 at 10:39:49PM -0700, Song Liu wrote: >> Tests are added to make sure CGROUP_SKB cannot access: >> tc_classid, data_meta, flow_keys >> >> and can read and write: >> mark, prority, and cb[0-4] >> >> and can

Re: [PATCH v3 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-17 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 10:39:49PM -0700, Song Liu wrote: > Tests are added to make sure CGROUP_SKB cannot access: > tc_classid, data_meta, flow_keys > > and can read and write: > mark, prority, and cb[0-4] > > and can read other fields. > > To make selftest with skb->sk work, a dummy sk is

[PATCH v3 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-17 Thread Song Liu
Tests are added to make sure CGROUP_SKB cannot access: tc_classid, data_meta, flow_keys and can read and write: mark, prority, and cb[0-4] and can read other fields. To make selftest with skb->sk work, a dummy sk is added in bpf_prog_test_run_skb(). Signed-off-by: Song Liu --- net/bpf/tes