diff options
author | 2022-05-12 01:16:52 +0530 | |
---|---|---|
committer | 2022-05-11 16:57:27 -0700 | |
commit | 5cdccadcac2612f947ebc26ad7023dfb7e8871f9 (patch) | |
tree | 73e7ec42e6a391e7263b476569eea5b35f97ca93 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bpf: Fix sparse warning for bpf_kptr_xchg_proto (diff) | |
download | linux-dev-5cdccadcac2612f947ebc26ad7023dfb7e8871f9.tar.xz linux-dev-5cdccadcac2612f947ebc26ad7023dfb7e8871f9.zip |
bpf: Prepare prog_test_struct kfuncs for runtime tests
In an effort to actually test the refcounting logic at runtime, add a
refcount_t member to prog_test_ref_kfunc and use it in selftests to
verify and test the whole logic more exhaustively.
The kfunc calls for prog_test_member do not require runtime refcounting,
as they are only used for verifier selftests, not during runtime
execution. Hence, their implementation now has a WARN_ON_ONCE as it is
not meant to be reachable code at runtime. It is strictly used in tests
triggering failure cases in the verifier. bpf_kfunc_call_memb_release is
called from map free path, since prog_test_member is embedded in map
value for some verifier tests, so we skip WARN_ON_ONCE for it.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220511194654.765705-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions