bpf: Add bpf_dynptr_size
authorJoanne Koong <joannelkoong@gmail.com>
Thu, 20 Apr 2023 07:14:12 +0000 (00:14 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 27 Apr 2023 08:40:41 +0000 (10:40 +0200)
commit26662d7347a058ca497792c4b22ac91cc415cbf6
treef5a9b0a4847c06c67cd128c4dee612161f5aeb11
parent540ccf96ddbc173474c32e595787d5622253be3d
bpf: Add bpf_dynptr_size

bpf_dynptr_size returns the number of usable bytes in a dynptr.

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: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20230420071414.570108-4-joannelkoong@gmail.com
include/linux/bpf.h
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c