diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2023-07-13 02:56:39 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-07-13 16:24:29 -0700 |
commit | 7ce4dc3e4a9d954c8a1fb483c7a527e9b060b860 (patch) | |
tree | 813bb3f4b15f5eb7548a4f6740bb8826a12b592a /tools/testing/selftests/bpf/prog_tests/ptr_untrusted.c | |
parent | f892cac2371447b3a26dad117c7bcdf2c93215e1 (diff) |
bpf: Fix an error around PTR_UNTRUSTED
Per discussion with Alexei, the PTR_UNTRUSTED flag should not been
cleared when we start to walk a new struct, because the struct in
question may be a struct nested in a union. We should also check and set
this flag before we walk its each member, in case itself is a union.
We will clear this flag if the field is BTF_TYPE_SAFE_RCU_OR_NULL.
Fixes: 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20230713025642.27477-2-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/ptr_untrusted.c')
0 files changed, 0 insertions, 0 deletions