[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31b0c85dbf85486df116ade20caf8685843899b4.camel@gmail.com>
Date: Fri, 13 Dec 2024 19:13:00 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Daniel Xu <dxu@...uu.xyz>, Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: andrii@...nel.org, ast@...nel.org, shuah@...nel.org,
daniel@...earbox.net, john.fastabend@...il.com, martin.lau@...ux.dev,
song@...nel.org, yonghong.song@...ux.dev, kpsingh@...nel.org,
sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, mykolal@...com,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v5 4/5] bpf: verifier: Support eliding map
lookup nullness
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.
[...]
Powered by blists - more mailing lists