From: Alexei Starovoitov <ast@xxxxxxxxxx> The patch set is addressing a fallout from commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.") It was too aggressive with PTR_UNTRUSTED marks. Patches 1-6 are cleanup and adding verifier smartness to address real use cases in bpf programs that broke with too aggressive PTR_UNTRUSTED. The partial revert is done in patch 7 anyway. Alexei Starovoitov (8): bpf: Invoke btf_struct_access() callback only for writes. bpf: Remove unused arguments from btf_struct_access(). bpf: Refactor btf_nested_type_is_trusted(). bpf: Teach verifier that certain helpers accept NULL pointer. bpf: Refactor NULL-ness check in check_reg_type(). bpf: Allowlist few fields similar to __rcu tag. bpf: Undo strict enforcement for walking untagged fields. selftests/bpf: Add tracing tests for walking skb and req. include/linux/bpf.h | 10 +- include/linux/filter.h | 3 +- kernel/bpf/bpf_cgrp_storage.c | 4 +- kernel/bpf/bpf_inode_storage.c | 4 +- kernel/bpf/bpf_task_storage.c | 8 +- kernel/bpf/btf.c | 44 ++++----- kernel/bpf/verifier.c | 91 ++++++++++++++----- net/bpf/bpf_dummy_struct_ops.c | 14 ++- net/core/bpf_sk_storage.c | 4 +- net/core/filter.c | 21 ++--- net/ipv4/bpf_tcp_ca.c | 6 +- net/netfilter/nf_conntrack_bpf.c | 3 +- .../bpf/progs/test_sk_storage_tracing.c | 16 ++++ 13 files changed, 131 insertions(+), 97 deletions(-) -- 2.34.1