Re: [PATCH bpf-next v9 02/11] bpf: use last 8-bits for the nr_args in trampoline

From: David Laight

Date: Wed Jan 14 2026 - 04:52:24 EST


On Wed, 14 Jan 2026 10:19:02 +0800
Menglong Dong <menglong.dong@xxxxxxxxx> wrote:

> On 2026/1/14 09:22 Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> write:
> > On Sat, Jan 10, 2026 at 6:11 AM Menglong Dong <menglong8.dong@xxxxxxxxx> wrote:
> > >
> > > For now, ctx[-1] is used to store the nr_args in the trampoline. However,
> > > 1-byte is enough to store such information. Therefore, we use only the
> > > last byte of ctx[-1] to store the nr_args, and reserve the rest for other
> >
> > Looking at the assembly below I think you are extracting the least
> > significant byte, right? I'd definitely not call it "last" byte...
> > Let's be precise and unambiguous here.
>
> Yeah, the "last 8-bits", "last byte" is ambiguous. So let's describe it as
> "the least significant byte" here instead :)

Or just s/last/low/

David

>
> Thanks!
> Menglong Dong