]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Change bpf_kallsyms_lookup_name size type to ARG_CONST_SIZE_OR_ZERO
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Mon, 22 Nov 2021 23:57:31 +0000 (05:27 +0530)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 30 Nov 2021 23:48:14 +0000 (15:48 -0800)
commit499e365f8533fbddd858ac510455f9c26dd863f4
tree6d7c172b35a5e6a707c5f6d7091e3fe851ab5e07
parent42428911ee7be3521b746b7551d8bfa0a1b09bf0
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 <andrii@kernel.org>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211122235733.634914-2-memxor@gmail.com
kernel/bpf/syscall.c