Re: [PATCH bpf-next v10 11/24] bpf: Rewrite kfunc argument handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 18, 2022 at 07:26:01AM +0530, Kumar Kartikeya Dwivedi wrote:
>  static int btf_check_func_arg_match(struct bpf_verifier_env *env,
>  				    const struct btf *btf, u32 func_id,
>  				    struct bpf_reg_state *regs,
>  				    bool ptr_to_mem_ok,
> -				    struct bpf_kfunc_arg_meta *kfunc_meta,
>  				    bool processing_call)

Something odd here.
Benjamin added the processing_call flag in
commit 95f2f26f3cac ("bpf: split btf_check_subprog_arg_match in two")
and we discussed to remove it.

>  		} else if (ptr_to_mem_ok && processing_call) {

since kfunc bit is gone from here the processing_call can be removed.
ptr_to_mem_ok and processing_call are two bool flags for the same thing, right?

> +static int process_kf_arg_ptr_to_kptr_strong(struct bpf_verifier_env *env,

I fixed this bit while applying.

> +static int check_kfunc_args(struct bpf_verifier_env *env, struct bpf_kfunc_call_arg_meta *meta)

This function looks much better now.
The split of kfunc vs helper was long overdue.
Thank you for doing this.

I'm not convinced that KF_ARG_* is necessary, but it's much better than before.
So it's a step forward.

Pls watch for CI errors and follow up when necessary.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux