Re: [PATCH v2 net-next 3/3] bpf: add unprivileged bpf tests

2015-10-08 Thread Alexei Starovoitov
On 10/8/15 10:46 AM, Kees Cook wrote: samples/bpf/libbpf.h|8 + > samples/bpf/test_verifier.c | 357 +-- Instead of living in samples/ could these be moved and hooked up to tools/testing/selftests/ instead? as a follow up patch. yes. of co

Re: [PATCH v2 net-next 3/3] bpf: add unprivileged bpf tests

2015-10-08 Thread Kees Cook
On Wed, Oct 7, 2015 at 10:23 PM, Alexei Starovoitov wrote: > Add new tests samples/bpf/test_verifier: > > unpriv: return pointer > checks that pointer cannot be returned from the eBPF program > > unpriv: add const to pointer > unpriv: add pointer to pointer > unpriv: neg pointer > checks that

[PATCH v2 net-next 3/3] bpf: add unprivileged bpf tests

2015-10-07 Thread Alexei Starovoitov
Add new tests samples/bpf/test_verifier: unpriv: return pointer checks that pointer cannot be returned from the eBPF program unpriv: add const to pointer unpriv: add pointer to pointer unpriv: neg pointer checks that pointer arithmetic is disallowed unpriv: cmp pointer with const unpriv: cmp