RFC bpf: Clean up _OR_NULL arg types
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest8 of 9 patches 8 repliesIn review
8 of 9 patches are in this archive. The cover letter announces 9.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 2/9 | bpf: Remove ARG_PTR_TO_MAP_VALUE_OR_NULLinclude/ kernel/ kernel/ +2 more | +30 | 0 replies | |
| 3/9 | bpf: Remove ARG_PTR_TO_MEM_OR_NULLinclude/ kernel/ kernel/ +2 more | +32 | 0 replies | |
| 4/9 | bpf: Remove ARG_CONST_SIZE_OR_ZEROinclude/ kernel/ kernel/ +4 more | +135 | 1 reply | |
| 5/9 | bpf: Remove ARG_PTR_TO_CTX_OR_NULLinclude/ kernel/ kernel/ +1 more | +20 | 0 replies | |
| 6/9 | bpf: Remove ARG_PTR_TO_SOCKET_OR_NULLinclude/ kernel/ net/ | +4 | 0 replies | |
| 7/9 | bpf: Remove ARG_PTR_TO_ALLOC_MEM_OR_NULLinclude/ kernel/ | +0 | 0 replies | |
| 8/9 | bpf: Rename ARG_CONST_ALLOC_SIZE_OR_ZEROinclude/ kernel/ kernel/ | +7 | 0 replies | |
| 9/9 | bpf: Rename ARG_PTR_TO_STACK_OR_NULLinclude/ kernel/ kernel/ +1 more | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH bpf-next 0/9] bpf: Clean up _OR_NULL arg types
This is a pure cleanup patchset that tries to use flag to mark whether an arg may be null. It replaces enum bpf_arg_type with a struct. Doing so allows us to embed the properties of arguments in the struct, which is a more scalable solution than introducing a new enum. This patchset performs this transformation only on arg_type. If it looks good, follow-up patches will do the same on reg_type and ret_type.
The first patch replaces 'enum bpf_arg_type' with 'struct bpf_arg_type' and each of the rest patches transforms one type of ARG_XXX_OR_NULLs.
This is purely refactoring patch and should not have any behavior changes.
Hao Luo (9):
bpf: Replace enum bpf_arg_type with struct.
bpf: Remove ARG_PTR_TO_MAP_VALUE_OR_NULL
bpf: Remove ARG_PTR_TO_MEM_OR_NULL
bpf: Remove ARG_CONST_SIZE_OR_ZERO
bpf: Remove ARG_PTR_TO_CTX_OR_NULL
bpf: Remove ARG_PTR_TO_SOCKET_OR_NULL
bpf: Remove ARG_PTR_TO_ALLOC_MEM_OR_NULL
bpf: Rename ARG_CONST_ALLOC_SIZE_OR_ZERO
bpf: Rename ARG_PTR_TO_STACK_OR_NULL
include/linux/bpf.h | 102 ++--- kernel/bpf/bpf_inode_storage.c | 15 +- kernel/bpf/bpf_iter.c | 11 +- kernel/bpf/bpf_lsm.c | 10 +- kernel/bpf/bpf_task_storage.c | 15 +- kernel/bpf/btf.c | 8 +- kernel/bpf/cgroup.c | 31 +- kernel/bpf/core.c | 8 +- kernel/bpf/helpers.c | 138 ++++--- kernel/bpf/ringbuf.c | 32 +- kernel/bpf/stackmap.c | 45 +- kernel/bpf/syscall.c | 16 +- kernel/bpf/task_iter.c | 13 +- kernel/bpf/verifier.c | 179 ++++---- kernel/trace/bpf_trace.c | 267 +++++++----- net/core/bpf_sk_storage.c | 41 +- net/core/filter.c | 729 +++++++++++++++++---------------- net/core/sock_map.c | 48 +-- net/ipv4/bpf_tcp_ca.c | 4 +- 19 files changed, 932 insertions(+), 780 deletions(-)
Signature · 1 line
2.34.0.rc0.344.g81b53c2807-goog