Hi all,
Today's linux-next merge of the bpf-next tree got a conflict in:
kernel/bpf/verifier.c
between commit:
a8502a79e832b ("bpf: Fix regsafe() for pointers to packet")
from the bpf tree and commit:
022ac07508836 ("bpf: use reg->var_off instead of reg->off for pointers")
from the bpf-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc kernel/bpf/verifier.c
index a3388cb8fcbdf,8c1cf2eb6cbbd..0000000000000
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@@ -19915,18 -20075,8 +20075,13 @@@ static bool regsafe(struct bpf_verifier
* since someone could have accessed through (ptr - k), or
* even done ptr -= k in a register, to get a safe access.
*/
- if (rold->range > rcur->range)
+ if (rold->range < 0 || rcur->range < 0) {
+ /* special case for [BEYOND|AT]_PKT_END */
+ if (rold->range != rcur->range)
+ return false;
+ } else if (rold->range > rcur->range) {
return false;
+ }
- /* If the offsets don't match, we can't trust our alignment;
- * nor can we be sure that we won't fall out of range.
- */
- if (rold->off != rcur->off)
- return false;
/* id relations must be preserved */
if (!check_ids(rold->id, rcur->id, idmap))
return false;
On Wed, Apr 1, 2026 at 5:29 AM Mark Brown <broonie@kernel.org> wrote:
>
> Hi all,
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> kernel/bpf/verifier.c
>
> between commit:
>
> a8502a79e832b ("bpf: Fix regsafe() for pointers to packet")
>
> from the bpf tree and commit:
>
> 022ac07508836 ("bpf: use reg->var_off instead of reg->off for pointers")
>
> from the bpf-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
thanks for headsup.
lgtm
we will get it resolved once bpf tree gets pulled.
© 2016 - 2026 Red Hat, Inc.