BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Daniel Xu <dxu@dxuuu.xyz>,
	daniel@iogearbox.net, andrii@kernel.org,  ast@kernel.org
Cc: john.fastabend@gmail.com, martin.lau@linux.dev, song@kernel.org,
	 yonghong.song@linux.dev, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, 	jolsa@kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org, 	mhartmay@linux.ibm.com,
	iii@linux.ibm.com
Subject: Re: [PATCH bpf-next 3/3] bpf: verifier: Disambiguate get_constant_map_key() errors
Date: Mon, 03 Feb 2025 10:49:32 -0800	[thread overview]
Message-ID: <3f392f10e29f651836bf28e342150a6169e6e0d9.camel@gmail.com> (raw)
In-Reply-To: <91d84512b4082e5eb095b31e5536944a3d53f0eb.1738439839.git.dxu@dxuuu.xyz>

On Sat, 2025-02-01 at 12:58 -0700, Daniel Xu wrote:
> Refactor get_constant_map_key() to disambiguate the constant key
> value from potential error values. In the case that the key is
> negative, it could be confused for an error.
> 
> It's not currently an issue, as the verifier seems to track s32 spills
> as u32. So even if the program wrongly uses a negative value for an
> arraymap key, the verifier just thinks it's an impossibly high value
> which gets correctly discarded.
> 
> Refactor anyways to make things cleaner and prevent potential future
> issues.
> 
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ---

Acked-by: Eduard Zingerman <eddyz87@gmail.com>

[...]


      reply	other threads:[~2025-02-03 18:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-01 19:58 [PATCH bpf-next 0/3] bpf: Some fixes for nullness elision Daniel Xu
2025-02-01 19:58 ` [PATCH bpf-next 1/3] bpf: verifier: Do not extract constant map keys for irrelevant maps Daniel Xu
2025-02-03 18:45   ` Eduard Zingerman
2025-02-04  9:09     ` Daniel Xu
2025-02-01 19:58 ` [PATCH bpf-next 2/3] bpf: selftests: Test constant key extraction on " Daniel Xu
2025-02-03 18:48   ` Eduard Zingerman
2025-02-01 19:58 ` [PATCH bpf-next 3/3] bpf: verifier: Disambiguate get_constant_map_key() errors Daniel Xu
2025-02-03 18:49   ` Eduard Zingerman [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=3f392f10e29f651836bf28e342150a6169e6e0d9.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=haoluo@google.com \
    --cc=iii@linux.ibm.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mhartmay@linux.ibm.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --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