#
6c3eba1c |
| 13-Jun-2023 |
Andrii Nakryiko <andrii@kernel.org> |
bpf: Centralize permissions checks for all BPF map types
This allows to do more centralized decisions later on, and generally makes it very explicit which maps are privileged and which are not (e.g.
bpf: Centralize permissions checks for all BPF map types
This allows to do more centralized decisions later on, and generally makes it very explicit which maps are privileged and which are not (e.g., LRU_HASH and LRU_PERCPU_HASH, which are privileged HASH variants, as opposed to unprivileged HASH and HASH_PERCPU; now this is explicit and easy to verify).
Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/bpf/20230613223533.3689589-4-andrii@kernel.org
show more ...
|
#
c5a237a4 |
| 14-Feb-2023 |
Ilya Leoshkevich <iii@linux.ibm.com> |
selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()
Use the new type-safe wrappers around bpf_obj_get_info_by_fd(). Fix a prog/map mixup in prog_holds_map().
Signed-off-by: Ilya Leoshkevich
selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()
Use the new type-safe wrappers around bpf_obj_get_info_by_fd(). Fix a prog/map mixup in prog_holds_map().
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20230214231221.249277-6-iii@linux.ibm.com
show more ...
|
#
f9a3eca4 |
| 23-May-2022 |
Colin Ian King <colin.i.king@gmail.com> |
selftests/bpf: Fix spelling mistake: "unpriviliged" -> "unprivileged"
There are spelling mistakes in ASSERT messages. Fix these.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by
selftests/bpf: Fix spelling mistake: "unpriviliged" -> "unprivileged"
There are spelling mistakes in ASSERT messages. Fix these.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220523115604.49942-1-colin.i.king@gmail.com
show more ...
|
#
90a039fd |
| 19-May-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 u
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>
show more ...
|