Skip to content

Commit d4efb17

Browse files
kkdwivedianakryiko
authored andcommitted
bpf: Change bpf_kallsyms_lookup_name size type to ARG_CONST_SIZE_OR_ZERO
Andrii mentioned in [0] that switching to ARG_CONST_SIZE_OR_ZERO lets user avoid having to prove that string size at runtime is not zero and helps with not having to supress clang optimizations. [0]: https://lore.kernel.org/bpf/CAEf4BzZa_vhXB3c8atNcTS6=krQvC25H7K7c3WWZhM=27ro=Wg@mail.gmail.com Suggested-by: Andrii Nakryiko <[email protected]> Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent b98057e commit d4efb17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4804,7 +4804,7 @@ const struct bpf_func_proto bpf_kallsyms_lookup_name_proto = {
48044804
.gpl_only = false,
48054805
.ret_type = RET_INTEGER,
48064806
.arg1_type = ARG_PTR_TO_MEM,
4807-
.arg2_type = ARG_CONST_SIZE,
4807+
.arg2_type = ARG_CONST_SIZE_OR_ZERO,
48084808
.arg3_type = ARG_ANYTHING,
48094809
.arg4_type = ARG_PTR_TO_LONG,
48104810
};

0 commit comments

Comments
 (0)