diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2022-07-21 16:42:35 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-07-22 06:59:42 +0300 |
commit | a4703e3184320d6e15e2bc81d2ccf1c8c883f9d1 (patch) | |
tree | 7c085a648e132e5e6d43ac6562f9e9050e3feead /include/linux/bpf.h | |
parent | ef2c6f370a637e6f84c813f31fe0ebb4ced2ed69 (diff) | |
download | linux-a4703e3184320d6e15e2bc81d2ccf1c8c883f9d1.tar.xz |
bpf: Switch to new kfunc flags infrastructure
Instead of populating multiple sets to indicate some attribute and then
researching the same BTF ID in them, prepare a single unified BTF set
which indicates whether a kfunc is allowed to be called, and also its
attributes if any at the same time. Now, only one call is needed to
perform the lookup for both kfunc availability and its attributes.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220721134245.2450-4-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 11950029284f..a97751d845c9 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1924,7 +1924,8 @@ int btf_check_subprog_arg_match(struct bpf_verifier_env *env, int subprog, struct bpf_reg_state *regs); int btf_check_kfunc_arg_match(struct bpf_verifier_env *env, const struct btf *btf, u32 func_id, - struct bpf_reg_state *regs); + struct bpf_reg_state *regs, + u32 kfunc_flags); int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog, struct bpf_reg_state *reg); int btf_check_type_match(struct bpf_verifier_log *log, const struct bpf_prog *prog, |