bpf: Introduce KF_ARG_PTR_TO_CONST_STR
authorSong Liu <song@kernel.org>
Tue, 7 Nov 2023 04:57:25 +0000 (20:57 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Nov 2023 03:07:38 +0000 (19:07 -0800)
commit045edee19d591e59ed53772bf6dfc9b1ed9577eb
treec43ffde215600c1540057a1cb6680d5ac23e90fd
parent0b51940729150e807fc4b7767164e6bb6cf4f7dd
bpf: Introduce KF_ARG_PTR_TO_CONST_STR

Similar to ARG_PTR_TO_CONST_STR for BPF helpers, KF_ARG_PTR_TO_CONST_STR
specifies kfunc args that point to const strings. Annotation "__str" is
used to specify kfunc arg of type KF_ARG_PTR_TO_CONST_STR. Also, add
documentation for the "__str" annotation.

bpf_get_file_xattr() will be the first kfunc that uses this type.

Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://lore.kernel.org/bpf/20231107045725.2278852-4-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/kfuncs.rst
kernel/bpf/verifier.c