All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Protopopov <aspsk@isovalent.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jiri Olsa <jolsa@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Stanislav Fomichev <sdf@google.com>,
	Yonghong Song <yonghong.song@linux.dev>,
	bpf@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next] bpf: add a verbose message if map limit is reached
Date: Tue, 2 Apr 2024 07:32:55 +0000	[thread overview]
Message-ID: <Zgu0p8dnQmstDidp@zh-lab-node-5> (raw)
In-Reply-To: <660b6441860a3_801520892@john.notmuch>

On Mon, Apr 01, 2024 at 06:49:53PM -0700, John Fastabend wrote:
> Anton Protopopov wrote:
> > When more than 64 maps are used by a program and its subprograms the
> > verifier returns -E2BIG. Add a verbose message which highlights the
> > source of the error and also print the actual limit.
> > 
> > v1 -> v2:
> >   * make the message more clear (Alexey)
> > 
> > Signed-off-by: Anton Protopopov <aspsk@isovalent.com>
> > Acked-by: Yonghong Song <yonghong.song@linux.dev>
> > ---
> >  kernel/bpf/verifier.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index edb650667f44..559526191ae7 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -18348,6 +18348,8 @@ static int resolve_pseudo_ldimm64(struct bpf_verifier_env *env)
> >  			}
> >  
> >  			if (env->used_map_cnt >= MAX_USED_MAPS) {
> > +				verbose(env, "The total number of maps per program is reached the limit of %u\n",
> > +					MAX_USED_MAPS);
> >  				fdput(f);
> >  				return -E2BIG;
> >  			}
> > -- 
> > 2.34.1
> > 
> > 
> 
> LGTM thanks.
> 
> Acked-by: John Fastabend <john.fastabend@gmail.com>

Thanks. I will actually send yet another version, hopefully
the last, with 'has reached' instead of 'is reached'

      reply	other threads:[~2024-04-02  7:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 10:01 [PATCH v2 bpf-next] bpf: add a verbose message if map limit is reached Anton Protopopov
2024-04-02  1:49 ` John Fastabend
2024-04-02  7:32   ` Anton Protopopov [this message]

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=Zgu0p8dnQmstDidp@zh-lab-node-5 \
    --to=aspsk@isovalent.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@google.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 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.