From: Eduard Zingerman <eddyz87@gmail.com>
To: bot+bpf-ci@kernel.org, bpf@vger.kernel.org, ast@kernel.org,
andrii@kernel.org
Cc: daniel@iogearbox.net, martin.lau@linux.dev, kernel-team@fb.com,
yonghong.song@linux.dev, martin.lau@kernel.org, clm@meta.com,
ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next 3/3] bpf: rename bpf_reg_state->off to bpf_reg_state->delta
Date: Wed, 11 Feb 2026 15:14:17 -0800 [thread overview]
Message-ID: <87f0621428b98fd34bd13673509fa58b5f33249a.camel@gmail.com> (raw)
In-Reply-To: <da7183b4b0da3ec7ffe00c05a471098ea1eeb655f627d061baf5776d203677a2@mail.kernel.org>
On Wed, 2026-02-11 at 23:08 +0000, bot+bpf-ci@kernel.org wrote:
> > diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
> > --- a/include/linux/bpf_verifier.h
> > +++ b/include/linux/bpf_verifier.h
> > @@ -40,7 +40,7 @@ struct bpf_reg_state {
> > /*
> > * Constant delta between "linked" scalars with the same ID.
> > */
> > - s32 off;
> > + s32 delta;
>
> The NFP BPF offload driver still references reg->off in several places:
>
> drivers/net/ethernet/netronome/nfp/bpf/verifier.c:
> nfp_bpf_stack_arg_ok() {
> off = reg->var_off.value + reg->off;
> ...
> old_off = old_arg->reg.var_off.value + old_arg->reg.off;
> }
>
> nfp_bpf_check_stack_access() {
> new_off = reg->off + reg->var_off.value;
> }
>
> nfp_bpf_map_mark_used() {
> off = reg->var_off.value + meta->insn.off + reg->off;
> }
>
> Where reg is const struct bpf_reg_state *. Was this driver intended to be
> updated as part of this rename?
This is a valid point, the driver should be updated.
> Also, the comment block inside struct bpf_reg_state describing BPF_ADD_CONST
> still references the old field name:
>
> > /*
> > * Upper bit of ID is used to remember relationship between "linked"
> > * registers. Example:
> > * r1 = r2; both will have r1->id == r2->id == N
> > * r1 += 10; r1->id == N | BPF_ADD_CONST and r1->off == 10
> > * r3 = r2; both will have r3->id == r2->id == N
> > * w3 += 10; r3->id == N | BPF_ADD_CONST32 and r3->off == 10
> > */
>
> Should this comment also use r1->delta and r3->delta to match the new field
> name?
This is a valid point as well.
I'll wait a bit before sending v2 fixing the above issues.
next prev parent reply other threads:[~2026-02-11 23:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 22:31 [PATCH bpf-next 0/3] bpf: consolidate pointer offset tracking in var_off Eduard Zingerman
2026-02-11 22:31 ` [PATCH bpf-next 1/3] bpf: split check_reg_sane_offset() in two parts Eduard Zingerman
2026-02-11 22:31 ` [PATCH bpf-next 2/3] bpf: use reg->var_off instead of reg->off for pointers Eduard Zingerman
2026-02-12 2:23 ` Alexei Starovoitov
2026-02-12 5:06 ` Eduard Zingerman
2026-02-11 22:31 ` [PATCH bpf-next 3/3] bpf: rename bpf_reg_state->off to bpf_reg_state->delta Eduard Zingerman
2026-02-11 23:08 ` bot+bpf-ci
2026-02-11 23:14 ` Eduard Zingerman [this message]
2026-02-12 3:06 ` kernel test robot
2026-02-12 8:15 ` kernel test robot
2026-02-12 8:15 ` kernel test robot
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=87f0621428b98fd34bd13673509fa58b5f33249a.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--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