diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 21:22:28 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 21:22:28 +0100 |
commit | 93d11e0d76e3c5a8350c77d1463d9f845bdc9307 (patch) | |
tree | c6116c2fc89cd42c15201f710dc3096b7b9e491c /kernel/bpf/btf.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
parent | Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (diff) | |
download | linux-93d11e0d76e3c5a8350c77d1463d9f845bdc9307.tar.xz linux-93d11e0d76e3c5a8350c77d1463d9f845bdc9307.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Fast path bpf marge for some -next work.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'kernel/bpf/btf.c')
-rw-r--r-- | kernel/bpf/btf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 11740b300de9..6f094c9f7f0b 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -5789,7 +5789,8 @@ static int btf_check_func_arg_match(struct bpf_verifier_env *env, } if (check_ptr_off_reg(env, reg, regno)) return -EINVAL; - } else if (is_kfunc && (reg->type == PTR_TO_BTF_ID || reg2btf_ids[reg->type])) { + } else if (is_kfunc && (reg->type == PTR_TO_BTF_ID || + (reg2btf_ids[base_type(reg->type)] && !type_flag(reg->type)))) { const struct btf_type *reg_ref_t; const struct btf *reg_btf; const char *reg_ref_tname; @@ -5817,7 +5818,7 @@ static int btf_check_func_arg_match(struct bpf_verifier_env *env, } } else { reg_btf = btf_vmlinux; - reg_ref_id = *reg2btf_ids[reg->type]; + reg_ref_id = *reg2btf_ids[base_type(reg->type)]; } reg_ref_t = btf_type_skip_modifiers(reg_btf, reg_ref_id, |