diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-06-14 00:35:33 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-06-19 14:04:04 +0200 |
commit | 7f6719f7a8662a40afed367a685516f9f34e7bc2 (patch) | |
tree | caa644c43993c20faef1d7446b79625e9ed2c941 /include/net/xdp_sock_drv.h | |
parent | bpf: Centralize permissions checks for all BPF map types (diff) | |
download | linux-7f6719f7a8662a40afed367a685516f9f34e7bc2.tar.xz linux-7f6719f7a8662a40afed367a685516f9f34e7bc2.zip |
bpf: Keep BPF_PROG_LOAD permission checks clear of validations
Move out flags validation and license checks out of the permission
checks. They were intermingled, which makes subsequent changes harder.
Clean this up: perform straightforward flag validation upfront, and
fetch and check license later, right where we use it. Also consolidate
capabilities check in one block, right after basic attribute sanity
checks.
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-5-andrii@kernel.org
Diffstat (limited to 'include/net/xdp_sock_drv.h')
0 files changed, 0 insertions, 0 deletions