From: Eduard Zingerman <eddyz87@gmail.com>
To: Daniel Xu <dxu@dxuuu.xyz>, Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: andrii@kernel.org, ast@kernel.org, shuah@kernel.org,
daniel@iogearbox.net, 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, mykolal@fb.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 4/5] bpf: verifier: Support eliding map lookup nullness
Date: Fri, 13 Dec 2024 19:13:00 -0800 [thread overview]
Message-ID: <31b0c85dbf85486df116ade20caf8685843899b4.camel@gmail.com> (raw)
In-Reply-To: <zow3q3nhlz6vedbni3upag5yr7zzrhyiqysl5nwyubebmbwojk@th7kbm62x36g>
On Fri, 2024-12-13 at 19:44 -0700, Daniel Xu wrote:
[...]
> > > + /* First handle precisely tracked STACK_ZERO, up to BPF_REG_SIZE */
> > > + stype = state->stack[spi].slot_type;
> > > + for (i = 0; i < BPF_REG_SIZE && stype[i] == STACK_ZERO; i++)
> >
> > it's Friday and I'm lazy, but please double-check that this works for
> > both big-endian and little-endian :)
>
> Any tips? Are the existing tests running thru s390x hosts in CI
> sufficient or should I add some tests writen in C (and not BPF
> assembler)? I can never think about endianness correctly...
I think that if test operates on a key like:
valid key 15
v
0000000f <-- written to stack as a single u64 value
^^^^^^^
stack zero marks
and is executed (e.g. using __retval annotation),
then CI passing for s390 should be enough.
There is a guide on how to gen a s390 environment locally:
https://docs.kernel.org/bpf/s390.html
I used it recently to build a vmlinux for s390 with no or minimal
issues. Used it to boot long time ago, but don't remember if there
were any surprises.
> > with Eduard's suggestion this also becomes interesting when you have
> > 000mmm mix (as one example), because that gives you a small range, and
> > all values might be valid keys for arrays
>
> Can you define what "small range" means? What range is there with 0's?
> Any pointers would be helpful.
I think Andrii means that each 'm' adds 8 bits of range.
E.g. range for 0000_000m is 0-255, range for 0000_00mm is 0-65535, etc.
[...]
next prev parent reply other threads:[~2024-12-14 3:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 23:22 [PATCH bpf-next v5 0/5] Support eliding map lookup nullness Daniel Xu
2024-12-12 23:22 ` [PATCH bpf-next v5 3/5] bpf: verifier: Refactor helper access type tracking Daniel Xu
2024-12-13 4:04 ` Eduard Zingerman
2024-12-13 20:02 ` Daniel Xu
2024-12-12 23:22 ` [PATCH bpf-next v5 4/5] bpf: verifier: Support eliding map lookup nullness Daniel Xu
2024-12-13 4:04 ` Eduard Zingerman
2024-12-13 20:57 ` Daniel Xu
2024-12-13 23:02 ` Andrii Nakryiko
2024-12-14 2:44 ` Daniel Xu
2024-12-14 3:13 ` Eduard Zingerman [this message]
2024-12-16 23:24 ` Andrii Nakryiko
2024-12-19 0:09 ` Daniel Xu
2024-12-19 21:41 ` Daniel Xu
2024-12-20 0:04 ` Eduard Zingerman
2024-12-20 0:40 ` Daniel Xu
2024-12-20 0:43 ` Eduard Zingerman
2024-12-20 0:49 ` Alexei Starovoitov
2024-12-20 4:00 ` Daniel Xu
2024-12-13 23:10 ` Kumar Kartikeya Dwivedi
2024-12-13 23:14 ` Eduard Zingerman
2024-12-13 23:18 ` Eduard Zingerman
2024-12-12 23:22 ` [PATCH bpf-next v5 5/5] bpf: selftests: verifier: Add nullness elision tests Daniel Xu
2024-12-14 6:17 ` Eduard Zingerman
2024-12-18 1:57 ` Daniel Xu
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=31b0c85dbf85486df116ade20caf8685843899b4.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii.nakryiko@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=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--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