Re: [PATCH bpf-next v3 3/4] bpf: add dummy BPF STRUCT_OPS for test purpose

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

 



Hi Martin,

On 10/23/2021 8:35 AM, Martin KaFai Lau wrote:
> On Fri, Oct 22, 2021 at 03:55:10PM +0800, Hou Tao wrote:
>
> +static struct bpf_dummy_ops_test_args *
> +dummy_ops_init_args(const union bpf_attr *kattr, unsigned int nr)
> +{
> +	__u32 size_in;
> +	struct bpf_dummy_ops_test_args *args;
> +	void __user *ctx_in;
> +	void __user *u_state;
> +
> +	if (!nr || nr > MAX_BPF_FUNC_ARGS)
> These checks are unnecessary and can be removed.  They had already been
> checked by the verifier during the bpf prog load time.
Yes. The check is done in bpf_struct_ops_init(). Will remove it in v4.
> Others lgtm.
>
> Acked-by: Martin KaFai Lau <kafai@xxxxxx>
Thanks again for your review.

Regards,
Tao



[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