diff options
| author | Joanne Koong <joannelkoong@gmail.com> | 2023-04-20 00:14:11 -0700 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-04-27 10:40:36 +0200 |
| commit | 540ccf96ddbc173474c32e595787d5622253be3d (patch) | |
| tree | c0228d85f2f719c4888102dd0605b7b87fb4369e /include/linux/bpf.h | |
| parent | 987d0242d189661f78b77cc4d77f843b15600fed (diff) | |
| download | linux-540ccf96ddbc173474c32e595787d5622253be3d.tar.gz linux-540ccf96ddbc173474c32e595787d5622253be3d.tar.bz2 linux-540ccf96ddbc173474c32e595787d5622253be3d.zip | |
bpf: Add bpf_dynptr_is_null and bpf_dynptr_is_rdonly
bpf_dynptr_is_null returns true if the dynptr is null / invalid
(determined by whether ptr->data is NULL), else false if
the dynptr is a valid dynptr.
bpf_dynptr_is_rdonly returns true if the dynptr is read-only,
else false if the dynptr is read-writable. If the dynptr is
null / invalid, false is returned by default.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20230420071414.570108-3-joannelkoong@gmail.com
Diffstat (limited to 'include/linux/bpf.h')
0 files changed, 0 insertions, 0 deletions
