Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH stable 7.1 6.18 0/2] selftests/bpf: Fix verifier_map_ptr failure after bpf_map excl field backport
@ 2026-07-28  7:25 Shung-Hsi Yu
  2026-07-28  7:25 ` [PATCH stable 7.1 6.18 1/2] selftests/bpf: Adjust verifier_map_ptr for the map's excl field Shung-Hsi Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shung-Hsi Yu @ 2026-07-28  7:25 UTC (permalink / raw)
  To: stable; +Cc: Shung-Hsi Yu

The BPF selftest "verifier_map_ptr/bpf_map_ptr: read non-existent field
rejected" currently fails on 7.1 and 6.18.

  VERIFIER LOG:
  =============
  [...]
  3: (61) r6 = \*(u32 \*)(r1 +33)
  access beyond the end of member excl (mend:36) in struct bpf_map with off 33 size 4
  =============
  EXPECTED   SUBSTR: 'cannot access ptr member ops with moff 32 in struct bpf_map with off 33 size 4'
  #630/5   verifier_map_ptr/bpf_map_ptr: read non-existent field rejected:FAIL

Root cause is due to both branches having backported upstream commit
0fb6c9ed6493 ("libbpf: Reject non-exclusive metadata maps in the signed
loader") that adds a new "u32 excl" member to struct bpf_map at offset
32, which pushes the ops pointer from offset 32 to offset 40, but
missing the update on BPF selftests' side.

Patch 1 updates the expected verifier message for the offset-33 read to
the "access beyond the end of member excl" rejection, making the test
pass again. However, that alone was not enough.

Patch 2 is the upstream follow-up to patch 1. It updates the probing
offset so it actually reads the ops pointer again

Tested on 6.18[1] and 7.1[2] and confirm that with this patchset
applied, verifier_map_ptr/bpf_map_ptr no longer fails. (Note: there are
currently several other failures, they'll be addressed separately). 

1: https://github.com/kernel-patches/linux-stable/actions/runs/30335038494/
2: https://github.com/kernel-patches/linux-stable/actions/runs/30334621104/

Daniel Borkmann (1):
  selftests/bpf: Keep verifier_map_ptr exercising ops pointer access

KP Singh (1):
  selftests/bpf: Adjust verifier_map_ptr for the map's excl field

 .../selftests/bpf/progs/verifier_map_ptr.c    | 36 ++++++++++++++++---
 1 file changed, 32 insertions(+), 4 deletions(-)


base-commit: 155b42bec9cbb6b8cdc47dd9bd09503a81fbe493
-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-28 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28  7:25 [PATCH stable 7.1 6.18 0/2] selftests/bpf: Fix verifier_map_ptr failure after bpf_map excl field backport Shung-Hsi Yu
2026-07-28  7:25 ` [PATCH stable 7.1 6.18 1/2] selftests/bpf: Adjust verifier_map_ptr for the map's excl field Shung-Hsi Yu
2026-07-28  7:25 ` [PATCH stable 7.1 6.18 2/2] selftests/bpf: Keep verifier_map_ptr exercising ops pointer access Shung-Hsi Yu
2026-07-28 16:10 ` [PATCH stable 7.1 6.18 0/2] selftests/bpf: Fix verifier_map_ptr failure after bpf_map excl field backport Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox