BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net,  martin.lau@linux.dev, kernel-team@fb.com,
	yonghong.song@linux.dev,  memxor@gmail.com, awerner32@gmail.com
Subject: Re: [PATCH bpf v3 06/11] bpf: verify callbacks as if they are called unknown number of times
Date: Tue, 21 Nov 2023 03:06:32 +0200	[thread overview]
Message-ID: <3333caf6578e73d433b0261297dfd588afb1868d.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzZLU3LxG9FVAGqEmvsqpU8+X1grWj_F7Fvjvv1E8xj6Nw@mail.gmail.com>

On Mon, 2023-11-20 at 17:00 -0800, Andrii Nakryiko wrote:
[...]
> > diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
> > index 24213a99cc79..6e21d74a64e7 100644
> > --- a/include/linux/bpf_verifier.h
> > +++ b/include/linux/bpf_verifier.h
> > @@ -400,6 +400,7 @@ struct bpf_verifier_state {
> >         struct bpf_idx_pair *jmp_history;
> >         u32 jmp_history_cnt;
> >         u32 dfs_depth;
> > +       u32 cumulative_callback_depth;
> 
> nit: depth and cumulative in this case doesn't make much sense to me,
> tbh. Cumulative is generally a sum of something. You don't seem to
> ever decrement this, so I guess "max_callback_depth" or
> "cur_callback_depth" would also make sense? "callback_unroll_depth" is
> another name that came to mind. But it's honestly not that important
> to me, the use of this field is very minimal in the code base.

Will use 'callback_unroll_depth' in v4, thanks.

  reply	other threads:[~2023-11-21  1:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 22:59 [PATCH bpf v3 00/11] verify callbacks as if they are called unknown number of times Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 01/11] selftests/bpf: track tcp payload offset as scalar in xdp_synproxy Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 02/11] selftests/bpf: track string payload offset as scalar in strobemeta Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 03/11] selftests/bpf: fix bpf_loop_bench for new callback verification scheme Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 04/11] bpf: extract __check_reg_arg() utility function Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 05/11] bpf: extract setup_func_entry() " Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 06/11] bpf: verify callbacks as if they are called unknown number of times Eduard Zingerman
2023-11-21  1:00   ` Andrii Nakryiko
2023-11-21  1:06     ` Eduard Zingerman [this message]
2023-11-20 22:59 ` [PATCH bpf v3 07/11] selftests/bpf: tests for iterating callbacks Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 08/11] bpf: widening for callback iterators Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 09/11] selftests/bpf: test widening for iterating callbacks Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 10/11] bpf: keep track of max number of bpf_loop callback iterations Eduard Zingerman
2023-11-21  1:04   ` Andrii Nakryiko
2023-11-21  1:09     ` Eduard Zingerman
2023-11-21  1:14       ` Andrii Nakryiko
2023-11-21  1:26         ` Alexei Starovoitov
2023-11-21  1:35           ` Eduard Zingerman
2023-11-20 22:59 ` [PATCH bpf v3 11/11] selftests/bpf: check if max number of bpf_loop iterations is tracked Eduard Zingerman

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=3333caf6578e73d433b0261297dfd588afb1868d.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=awerner32@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=yonghong.song@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox