Fix a build time warning, and address comments from Alexei on the merged version [0]. [0]: https://lore.kernel.org/bpf/20220424214901.2743946-1-memxor@xxxxxxxxx Kumar Kartikeya Dwivedi (4): bpf: Fix sparse warning for bpf_kptr_xchg_proto bpf: Prepare prog_test_struct kfuncs for runtime tests selftests/bpf: Add negative C tests for kptrs selftests/bpf: Add tests for kptr_ref refcounting include/linux/bpf.h | 1 + net/bpf/test_run.c | 32 +- .../selftests/bpf/prog_tests/map_kptr.c | 109 ++++- tools/testing/selftests/bpf/progs/map_kptr.c | 109 ++++- .../selftests/bpf/progs/map_kptr_fail.c | 419 ++++++++++++++++++ .../testing/selftests/bpf/verifier/map_kptr.c | 4 +- 6 files changed, 660 insertions(+), 14 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/map_kptr_fail.c -- 2.35.1