Home
last modified time | relevance | path

Searched hist:"90 a039fd19fc35d03a74ce2973992c878546cb20" (Results 1 – 2 of 2) sorted by relevance

/linux/tools/testing/selftests/bpf/progs/
H A Dtest_unpriv_bpf_disabled.c90a039fd19fc35d03a74ce2973992c878546cb20 Thu May 19 16:25:34 CEST 2022 Alan Maguire <alan.maguire@oracle.com> selftests/bpf: add tests verifying unprivileged bpf behaviour

tests load/attach bpf prog with maps, perfbuf and ringbuf, pinning
them. Then effective caps are dropped and we verify we can

- pick up the pin
- create ringbuf/perfbuf
- get ringbuf/perfbuf events, carry out map update, lookup and delete
- create a link

Negative testing also ensures

- BPF prog load fails
- BPF map create fails
- get fd by id fails
- get next id fails
- query fails
- BTF load fails

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/1652970334-30510-3-git-send-email-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dunpriv_bpf_disabled.c90a039fd19fc35d03a74ce2973992c878546cb20 Thu May 19 16:25:34 CEST 2022 Alan Maguire <alan.maguire@oracle.com> selftests/bpf: add tests verifying unprivileged bpf behaviour

tests load/attach bpf prog with maps, perfbuf and ringbuf, pinning
them. Then effective caps are dropped and we verify we can

- pick up the pin
- create ringbuf/perfbuf
- get ringbuf/perfbuf events, carry out map update, lookup and delete
- create a link

Negative testing also ensures

- BPF prog load fails
- BPF map create fails
- get fd by id fails
- get next id fails
- query fails
- BTF load fails

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/1652970334-30510-3-git-send-email-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>