]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add check_func_arg_reg_off function
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Fri, 4 Mar 2022 22:46:38 +0000 (04:16 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 5 Mar 2022 23:29:35 +0000 (15:29 -0800)
commitd77416cc4693a1aa5a4791999961047a2a49784b
tree5d346c1c9f6d9a89f9f3069c777f67979767c611
parent43fb3a05b2608fe468b1ab6a578101f7d2ee7e0c
bpf: Add check_func_arg_reg_off function

Lift the list of register types allowed for having fixed and variable
offsets when passed as helper function arguments into a common helper,
so that they can be reused for kfunc checks in later commits. Keeping a
common helper aids maintainability and allows us to follow the same
consistent rules across helpers and kfuncs. Also, convert check_func_arg
to use this function.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220304224645.3677453-2-memxor@gmail.com
include/linux/bpf_verifier.h
kernel/bpf/verifier.c