selftests/bpf: Test allowing NULL buffer in dynptr slice
authorDaniel Rosenberg <drosen@google.com>
Sat, 6 May 2023 01:31:31 +0000 (18:31 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 6 May 2023 23:42:57 +0000 (16:42 -0700)
commit1ce33b6c846fbe0439eeee477b767de4bc3ad35f
tree0b66939dd85f8f957a44b522838a8c0897fb6425
parent3bda08b63670c39be390fcb00e7718775508e673
selftests/bpf: Test allowing NULL buffer in dynptr slice

bpf_dynptr_slice(_rw) no longer requires a buffer for verification. If the
buffer is needed, but not present, the function will return NULL.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Link: https://lore.kernel.org/r/20230506013134.2492210-3-drosen@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/dynptr.c
tools/testing/selftests/bpf/progs/dynptr_success.c