Skip to content

Clean up BPF permissions checks

Andrii Nakryiko bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bpf: move unprivileged checks into map_create() and bpf_prog_load()kernel/bpf/syscall.c+19 -150 repliesApplied
2/4bpf: inline map creation logic in map_create() functionkernel/bpf/syscall.c+24 -330 repliesApplied
3/4bpf: centralize permissions checks for all BPF map typeskernel/bpf/bloom_filter.c kernel/bpf/bpf_local_storage.c kernel/bpf/bpf_struct_ops.c +11 more+52 -440 repliesApplied
4/4bpf: keep BPF_PROG_LOAD permission checks clear of validationskernel/bpf/syscall.c+9 -120 repliesApplied

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStanislav Fomichev
SeriesA-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/4] Clean up BPF permissions checks

This patch set contains a few refactorings to BPF map and BPF program creation permissions checks, which were originally part of BPF token patch set ([0]), but are logically completely independent and useful in their own right.

[0] https://patchwork.kernel.org/project/netdevbpf/list/?series=755113&state=*

Andrii Nakryiko (4):
bpf: move unprivileged checks into map_create() and bpf_prog_load()
bpf: inline map creation logic in map_create() function
bpf: centralize permissions checks for all BPF map types
bpf: keep BPF_PROG_LOAD permission checks clear of validations

 kernel/bpf/bloom_filter.c                     |   3 -
 kernel/bpf/bpf_local_storage.c                |   3 -
 kernel/bpf/bpf_struct_ops.c                   |   3 -
 kernel/bpf/cpumap.c                           |   4 -
 kernel/bpf/devmap.c                           |   3 -
 kernel/bpf/hashtab.c                          |   6 -
 kernel/bpf/lpm_trie.c                         |   3 -
 kernel/bpf/queue_stack_maps.c                 |   4 -
 kernel/bpf/reuseport_array.c                  |   3 -
 kernel/bpf/stackmap.c                         |   3 -
 kernel/bpf/syscall.c                          | 155 +++++++++++-------
 net/core/sock_map.c                           |   4 -
 net/xdp/xskmap.c                              |   4 -
 .../bpf/prog_tests/unpriv_bpf_disabled.c      |   6 +-
 14 files changed, 102 insertions(+), 102 deletions(-)
Signature · 1 line
2.34.1