diff options
| author | Daniel Rosenberg <[email protected]> | 2023-05-06 01:31:31 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-05-06 23:42:57 +0000 |
| commit | 1ce33b6c846fbe0439eeee477b767de4bc3ad35f (patch) | |
| tree | 0b66939dd85f8f957a44b522838a8c0897fb6425 /tools/testing/selftests/bpf/prog_tests/dynptr.c | |
| parent | bpf: Allow NULL buffers in bpf_dynptr_slice(_rw) (diff) | |
| download | kernel-1ce33b6c846fbe0439eeee477b767de4bc3ad35f.tar.gz kernel-1ce33b6c846fbe0439eeee477b767de4bc3ad35f.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/dynptr.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/dynptr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/dynptr.c b/tools/testing/selftests/bpf/prog_tests/dynptr.c index 0478916aff37..13d4b9ab16e7 100644 --- a/tools/testing/selftests/bpf/prog_tests/dynptr.c +++ b/tools/testing/selftests/bpf/prog_tests/dynptr.c @@ -26,6 +26,7 @@ static struct { {"test_dynptr_is_null", SETUP_SYSCALL_SLEEP}, {"test_dynptr_is_rdonly", SETUP_SKB_PROG}, {"test_dynptr_clone", SETUP_SKB_PROG}, + {"test_dynptr_skb_no_buff", SETUP_SKB_PROG}, }; static void verify_success(const char *prog_name, enum test_setup_type setup_type) |
