BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Eduard Zingerman <eddyz87@gmail.com>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	kernel-team@fb.com, Martin KaFai Lau <martin.lau@kernel.org>,
	Kuniyuki Iwashima <kuniyu@amazon.com>,
	Martin KaFai Lau <kafai@fb.com>
Subject: Re: [PATCH bpf-next v2 1/2] bpf: Track aligned st store as imprecise spilled registers
Date: Mon, 8 Jan 2024 11:40:49 -0800	[thread overview]
Message-ID: <9ef37508-39d6-4b8a-81c9-5e5b788cdc7f@linux.dev> (raw)
In-Reply-To: <ec2758667b5a286dd48ebaaa8cfafa1112699735.camel@gmail.com>


On 1/8/24 11:06 AM, Eduard Zingerman wrote:
> On Mon, 2024-01-08 at 10:59 -0800, Yonghong Song wrote:
> [...]
>
>> I guess one way could be doing backtracking with "... = arr[i]"
>> is to have four ranges, [-32, -24), [-24, -16), [-16, -8), [-8, 0).
>> Later, when we see arr[i] = r0 and i has range [-32, 0). Since it covers [-32, -24), etc.,
>> precision marking can proceed with 'r0'. But I guess this can potentially
>> increase verifier backtracking states a lot and is not scalable. Conservatively
>> doing precision marking with 'r0' (in arr[i] = r0) is a better idea.
> In theory it should be possible to collapse this range to min/max pair.
> But it is a complication, and I'd say it shouldn't be implemented
> unless we have evidence that it significantly improves verification
> performance.

Ack. We do not need to introduce this yet as the variable index range
should be much much less common.

>
>> Andrii has similar comments in
>>     https://lore.kernel.org/bpf/CAEf4Bzb0LdSPnFZ-kPRftofA6LsaOkxXLN4_fr9BLR3iG-te-g@mail.gmail.com/
>>

  reply	other threads:[~2024-01-08 19:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 23:26 [PATCH bpf-next v2 1/2] bpf: Track aligned st store as imprecise spilled registers Yonghong Song
2024-01-03 23:26 ` [PATCH bpf-next v2 2/2] selftests/bpf: Add a selftest with not-8-byte aligned BPF_ST Yonghong Song
2024-01-04 16:37 ` [PATCH bpf-next v2 1/2] bpf: Track aligned st store as imprecise spilled registers Eduard Zingerman
2024-01-04 17:13   ` Yonghong Song
2024-01-04 18:43     ` Eduard Zingerman
2024-01-04 18:30 ` Eduard Zingerman
2024-01-04 20:12   ` Yonghong Song
2024-01-04 21:10     ` Eduard Zingerman
2024-01-04 23:09       ` Andrii Nakryiko
2024-01-04 23:29         ` Eduard Zingerman
2024-01-05  1:05           ` Andrii Nakryiko
2024-01-05  7:14             ` Yonghong Song
2024-01-05  8:10               ` Yonghong Song
2024-01-05 23:37               ` Eduard Zingerman
2024-01-08 18:59                 ` Yonghong Song
2024-01-08 19:06                   ` Eduard Zingerman
2024-01-08 19:40                     ` Yonghong Song [this message]
2024-01-05 23:52             ` Eduard Zingerman
2024-01-08 19:51               ` Yonghong Song
2024-01-08 20:05                 ` Eduard Zingerman
2024-01-08 21:51                   ` Yonghong Song
2024-01-08 23:18               ` Andrii Nakryiko
2024-01-04 23:03 ` Andrii Nakryiko
2024-01-05  0:49 ` Andrii Nakryiko
2024-01-08 23:23 ` Andrii Nakryiko
2024-01-08 23:39   ` Yonghong Song

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=9ef37508-39d6-4b8a-81c9-5e5b788cdc7f@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=kuniyu@amazon.com \
    --cc=martin.lau@kernel.org \
    /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