Skip to content

Commit effcf62

Browse files
yonghong-songborkmann
authored andcommitted
selftests/bpf: Make bpf_dynptr_is_rdonly() prototyype consistent with kernel
Currently kernel kfunc bpf_dynptr_is_rdonly() has prototype ... __bpf_kfunc bool bpf_dynptr_is_rdonly(struct bpf_dynptr_kern *ptr) ... while selftests bpf_kfuncs.h has: extern int bpf_dynptr_is_rdonly(const struct bpf_dynptr *ptr) __ksym; Such a mismatch might cause problems although currently it is okay in selftests. Fix it to prevent future potential surprise. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20230517040409.4024618-1-yhs@fb.com
1 parent 12852f8 commit effcf62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/bpf/bpf_kfuncs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr *ptr, __u32 offset,
3737

3838
extern int bpf_dynptr_adjust(const struct bpf_dynptr *ptr, __u32 start, __u32 end) __ksym;
3939
extern bool bpf_dynptr_is_null(const struct bpf_dynptr *ptr) __ksym;
40-
extern int bpf_dynptr_is_rdonly(const struct bpf_dynptr *ptr) __ksym;
40+
extern bool bpf_dynptr_is_rdonly(const struct bpf_dynptr *ptr) __ksym;
4141
extern __u32 bpf_dynptr_size(const struct bpf_dynptr *ptr) __ksym;
4242
extern int bpf_dynptr_clone(const struct bpf_dynptr *ptr, struct bpf_dynptr *clone__init) __ksym;
4343

0 commit comments

Comments
 (0)