bpf: Undo strict enforcement for walking untagged fields.
authorAlexei Starovoitov <ast@kernel.org>
Tue, 4 Apr 2023 04:50:28 +0000 (21:50 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 4 Apr 2023 23:57:24 +0000 (16:57 -0700)
commitafeebf9f57a4965e0be90e4dc87f8f3a1417376d
tree679061f4657f58b3e59255e932f081f25d4018d5
parent30ee9821f9430c34a6254134a5f0e8db227510be
bpf: Undo strict enforcement for walking untagged fields.

The commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
broke several tracing bpf programs. Even in clang compiled kernels there are
many fields that are not marked with __rcu that are safe to read and pass into
helpers, but the verifier doesn't know that they're safe. Aggressively marking
them as PTR_UNTRUSTED was premature.

Fixes: 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/bpf/20230404045029.82870-8-alexei.starovoitov@gmail.com
kernel/bpf/verifier.c