mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Sun Jian <sun.jian.kdev@gmail.com>, bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	 ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
	andrii@kernel.org, 	martin.lau@linux.dev, memxor@gmail.com,
	song@kernel.org, yonghong.song@linux.dev, 	jolsa@kernel.org,
	shuah@kernel.org, dxu@dxuuu.xyz
Subject: Re: [PATCH bpf 1/2] bpf: Avoid eliding lookup NULLness for inner map templates
Date: Thu, 25 Jun 2026 11:53:13 -0700	[thread overview]
Message-ID: <01858c50447df77199abbe570d3ce06288200721.camel@gmail.com> (raw)
In-Reply-To: <20260624072031.735846-1-sun.jian.kdev@gmail.com>

On Wed, 2026-06-24 at 15:20 +0800, Sun Jian wrote:
> Commit d2102f2f5d75 ("bpf: verifier: Support eliding map lookup
> nullness") allowed the verifier to elide NULLness of
> bpf_map_lookup_elem() for array maps when the key is statically known to
> be within max_entries.
> 
> This is not valid for array maps used as inner map templates. For such
> maps, the template's max_entries is not necessarily the same as the
> max_entries of the concrete inner map used at runtime. As a result, a
> key that is within the template's max_entries can still be out of range
> for the concrete inner map, and the lookup may return NULL.
> 
> Do not elide lookup NULLness for array maps used as inner map templates.
> 
> Fixes: d2102f2f5d75 ("bpf: verifier: Support eliding map lookup nullness")
> Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
> ---

This was already fixed by commit:
53040a81ae57 ("bpf: Keep dynamic inner array lookups nullable")
Please do not send stale patches.

[...]

  parent reply	other threads:[~2026-06-25 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  7:20 Sun Jian
2026-06-24  7:20 ` [PATCH bpf 2/2] selftests/bpf: Add inner map template lookup NULLness test Sun Jian
2026-06-25 18:53 ` Eduard Zingerman [this message]
2026-06-26  0:44   ` [PATCH bpf 1/2] bpf: Avoid eliding lookup NULLness for inner map templates sun jian

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=01858c50447df77199abbe570d3ce06288200721.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dxu@dxuuu.xyz \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=sun.jian.kdev@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

all inboxes | Powered by JetHome®