All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hou Tao <houtao1@huawei.com>
To: Martin KaFai Lau <kafai@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>, Yonghong Song <yhs@fb.com>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v3 3/4] bpf: add dummy BPF STRUCT_OPS for test purpose
Date: Sun, 24 Oct 2021 18:32:12 +0800	[thread overview]
Message-ID: <7f727cb6-61d8-e626-041d-b85155c8e72a@huawei.com> (raw)
In-Reply-To: <20211023003530.c2sfy6ogic7gdvzs@kafai-mbp.dhcp.thefacebook.com>

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@fb.com>
Thanks again for your review.

Regards,
Tao

  reply	other threads:[~2021-10-24 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  7:55 [PATCH bpf-next v3 0/4] introduce dummy BPF STRUCT_OPS Hou Tao
2021-10-22  7:55 ` [PATCH bpf-next v3 1/4] bpf: factor out a helper to prepare trampoline for struct_ops prog Hou Tao
2021-10-23  0:14   ` Martin KaFai Lau
2021-10-22  7:55 ` [PATCH bpf-next v3 2/4] bpf: factor out helpers to check ctx access for BTF function Hou Tao
2021-10-23  0:18   ` Martin KaFai Lau
2021-10-24  9:27     ` Hou Tao
2021-10-22  7:55 ` [PATCH bpf-next v3 3/4] bpf: add dummy BPF STRUCT_OPS for test purpose Hou Tao
2021-10-23  0:35   ` Martin KaFai Lau
2021-10-24 10:32     ` Hou Tao [this message]
2021-10-22  7:55 ` [PATCH bpf-next v3 4/4] selftests/bpf: add test cases for struct_ops prog Hou Tao
2021-10-23  1:00   ` Martin KaFai Lau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f727cb6-61d8-e626-041d-b85155c8e72a@huawei.com \
    --to=houtao1@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.