* Re: [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes [not found] <20260601180400.1381736-1-jt26wzz@gmail.com> @ 2026-06-02 5:47 ` Shung-Hsi Yu 2026-06-02 6:42 ` Shung-Hsi Yu 0 siblings, 1 reply; 5+ messages in thread From: Shung-Hsi Yu @ 2026-06-02 5:47 UTC (permalink / raw) To: Zhenzhong Wu, eddyz87 Cc: stable, Paul Chaignon, bpf, netdev, linux-kernel, ast, daniel, john.fastabend, andrii, martin.lau, song, yonghong.song, kpsingh, sdf, haoluo, jolsa, menglong8.dong, tamird Hi Zhenzhong, Thanks for looking at the stable kernel branch! Since this patchset is intended for stable 6.1 I'd suggest to also include stable@vger.kernel.org even if this is an RFC (and ideally with 'PATCH stable ...' as subject prefix, but that's just minor), so that the stable team is aware. On Tue, Jun 02, 2026 at 02:03:58AM +0800, Zhenzhong Wu wrote: > Hi BPF maintainers, > > This RFC backports two BPF verifier scalar range-tracking fixes to 6.1.y. > The series is intended to fix a verifier state-pruning issue where an > impossible scalar path can be kept while the real success path is pruned. > > This is a verifier scalar range-tracking issue, not a helper-specific > issue. > The visible failure is that the verifier can prune the real success > continuation, which should not be skipped, and keep only an impossible one. ... This sounds somewhat similar to the issue fixed in "backport of iterator and callback handling fixes" for stable 6.6[1] by @Eduard. Could you try to test on the latest stable 6.6.y as well at see if you can reproduce the issue there? Also per stable policy[2] we have backport the patches in the series to 6.6 first if we want it in 6.1 anyway. When using option 2 or 3 you can ask for your change to be included in specific stable series. When doing so, ensure the fix or an equivalent is applicable, submitted, or already present in all newer stable trees still supported. This is meant to prevent regressions that users might later encounter on updating... Cheers, Shung-Hsi Yu 1: https://lore.kernel.org/stable/20240125001554.25287-1-eddyz87@gmail.com/ 2: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes 2026-06-02 5:47 ` [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes Shung-Hsi Yu @ 2026-06-02 6:42 ` Shung-Hsi Yu 2026-06-02 9:17 ` Shung-Hsi Yu 0 siblings, 1 reply; 5+ messages in thread From: Shung-Hsi Yu @ 2026-06-02 6:42 UTC (permalink / raw) To: Zhenzhong Wu Cc: stable, Paul Chaignon, bpf, netdev, linux-kernel, ast, daniel, john.fastabend, andrii, martin.lau, song, yonghong.song, kpsingh, haoluo, jolsa, menglong8.dong, tamird, eddyz87 On Tue, Jun 02, 2026 at 01:47:01PM +0800, Shung-Hsi Yu wrote: ... > On Tue, Jun 02, 2026 at 02:03:58AM +0800, Zhenzhong Wu wrote: > > Hi BPF maintainers, > > > > This RFC backports two BPF verifier scalar range-tracking fixes to 6.1.y. > > The series is intended to fix a verifier state-pruning issue where an > > impossible scalar path can be kept while the real success path is pruned. > > > > This is a verifier scalar range-tracking issue, not a helper-specific > > issue. > > The visible failure is that the verifier can prune the real success > > continuation, which should not be skipped, and keep only an impossible one. > ... > > This sounds somewhat similar to the issue fixed in "backport of iterator > and callback handling fixes" for stable 6.6[1] by @Eduard. Could you try > to test on the latest stable 6.6.y as well at see if you can reproduce > the issue there? ... My mistake, the reproducer you had doesn't use iterator or callback, so probably not fixed in stable 6.6. I'll take a better look at this later this week. > 1: https://lore.kernel.org/stable/20240125001554.25287-1-eddyz87@gmail.com/ > 2: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes 2026-06-02 6:42 ` Shung-Hsi Yu @ 2026-06-02 9:17 ` Shung-Hsi Yu 2026-06-02 17:25 ` Zhenzhong Wu 0 siblings, 1 reply; 5+ messages in thread From: Shung-Hsi Yu @ 2026-06-02 9:17 UTC (permalink / raw) To: Zhenzhong Wu Cc: stable, Paul Chaignon, bpf, netdev, linux-kernel, ast, daniel, john.fastabend, andrii, martin.lau, song, yonghong.song, kpsingh, haoluo, jolsa, menglong8.dong, tamird, eddyz87 On Tue, Jun 02, 2026 at 02:42:35PM +0800, Shung-Hsi Yu wrote: > On Tue, Jun 02, 2026 at 01:47:01PM +0800, Shung-Hsi Yu wrote: > ... > > On Tue, Jun 02, 2026 at 02:03:58AM +0800, Zhenzhong Wu wrote: > > > Hi BPF maintainers, > > > > > > This RFC backports two BPF verifier scalar range-tracking fixes to 6.1.y. > > > The series is intended to fix a verifier state-pruning issue where an > > > impossible scalar path can be kept while the real success path is pruned. > > > > > > This is a verifier scalar range-tracking issue, not a helper-specific > > > issue. > > > The visible failure is that the verifier can prune the real success > > > continuation, which should not be skipped, and keep only an impossible one. > > ... > > > > This sounds somewhat similar to the issue fixed in "backport of iterator > > and callback handling fixes" for stable 6.6[1] by @Eduard. Could you try > > to test on the latest stable 6.6.y as well at see if you can reproduce > > the issue there? > ... > > My mistake, the reproducer you had doesn't use iterator or callback, so > probably not fixed in stable 6.6. I'll take a better look at this later > this week. Two more ideas beside testing on latest stable 6.6. 1. Can you try testing on bpf-next, but with commit d028f87517d6 'bpf: make the verifier tracks the "not equal" for regs' reverted? My concern is that it is possible that commit d028f87517d6 does not address the root cause of incorrect state pruning here. If the reproducer _fails_ to reproduce the issue even with commit d028f87517d6 reverted, then it is possible that the root cause was fixed by another commit further down the line. 2. Have you consider adding your reproducer into BPF selftests? Would be very useful to have in stable (though it needs to first land in bpf-next first). > > 1: https://lore.kernel.org/stable/20240125001554.25287-1-eddyz87@gmail.com/ > > 2: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes 2026-06-02 9:17 ` Shung-Hsi Yu @ 2026-06-02 17:25 ` Zhenzhong Wu 2026-06-06 9:19 ` Shung-Hsi Yu 0 siblings, 1 reply; 5+ messages in thread From: Zhenzhong Wu @ 2026-06-02 17:25 UTC (permalink / raw) To: Shung-Hsi Yu Cc: stable, Paul Chaignon, bpf, netdev, linux-kernel, ast, daniel, john.fastabend, andrii, martin.lau, song, yonghong.song, kpsingh, haoluo, jolsa, menglong8.dong, tamird, eddyz87 Hi Shung-Hsi, Thanks, that makes sense. I was mixing up two different things here: the BPF docs say not to add "Cc: stable@vger.kernel.org" to the patch description as a stable tag, and instead ask BPF maintainers to queue stable fixes. Cc'ing stable@ in the email headers for awareness is separate. Thanks for pointing this out. Thanks also for pointing out the 6.6.y requirement. I'll make sure v2 takes the stable ordering requirement into account before targeting 6.1.y. I ran the suggested checks with the same reproducer, where BAD means the program ran and observed the unexpected error, and GOOD means no error was observed: - latest 6.6.y, v6.6.142 (924b4a879cbb): BAD - bpf-next at b93c55b4932d: GOOD - bpf-next with the d028f87517d6 JNE refinement reverted: still GOOD So the issue still reproduces on the latest 6.6.y, but d028f87517d6 alone does not explain why bpf-next passes. I'll do more narrowing and update the candidate backport set accordingly. I'm also happy to add a BPF selftest for this. I plan to send a v2 series later this week. BR, Zhenzhong Shung-Hsi Yu <shung-hsi.yu@suse.com>于2026年6月2日 周二17:18写道: On Tue, Jun 2, 2026 at 5:18 PM Shung-Hsi Yu <shung-hsi.yu@suse.com> wrote: > > On Tue, Jun 02, 2026 at 02:42:35PM +0800, Shung-Hsi Yu wrote: > > On Tue, Jun 02, 2026 at 01:47:01PM +0800, Shung-Hsi Yu wrote: > > ... > > > On Tue, Jun 02, 2026 at 02:03:58AM +0800, Zhenzhong Wu wrote: > > > > Hi BPF maintainers, > > > > > > > > This RFC backports two BPF verifier scalar range-tracking fixes to 6.1.y. > > > > The series is intended to fix a verifier state-pruning issue where an > > > > impossible scalar path can be kept while the real success path is pruned. > > > > > > > > This is a verifier scalar range-tracking issue, not a helper-specific > > > > issue. > > > > The visible failure is that the verifier can prune the real success > > > > continuation, which should not be skipped, and keep only an impossible one. > > > ... > > > > > > This sounds somewhat similar to the issue fixed in "backport of iterator > > > and callback handling fixes" for stable 6.6[1] by @Eduard. Could you try > > > to test on the latest stable 6.6.y as well at see if you can reproduce > > > the issue there? > > ... > > > > My mistake, the reproducer you had doesn't use iterator or callback, so > > probably not fixed in stable 6.6. I'll take a better look at this later > > this week. > > Two more ideas beside testing on latest stable 6.6. > > 1. Can you try testing on bpf-next, but with commit d028f87517d6 'bpf: > make the verifier tracks the "not equal" for regs' reverted? My > concern is that it is possible that commit d028f87517d6 does not > address the root cause of incorrect state pruning here. > > If the reproducer _fails_ to reproduce the issue even with commit > d028f87517d6 reverted, then it is possible that the root cause was > fixed by another commit further down the line. > > 2. Have you consider adding your reproducer into BPF selftests? Would be > very useful to have in stable (though it needs to first land in > bpf-next first). > > > > 1: https://lore.kernel.org/stable/20240125001554.25287-1-eddyz87@gmail.com/ > > > 2: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes 2026-06-02 17:25 ` Zhenzhong Wu @ 2026-06-06 9:19 ` Shung-Hsi Yu 0 siblings, 0 replies; 5+ messages in thread From: Shung-Hsi Yu @ 2026-06-06 9:19 UTC (permalink / raw) To: Zhenzhong Wu Cc: stable, Paul Chaignon, bpf, netdev, linux-kernel, ast, daniel, john.fastabend, andrii, martin.lau, song, yonghong.song, kpsingh, haoluo, jolsa, menglong8.dong, tamird, eddyz87 Just want to send out a quick reply after looking at this. On Wed, Jun 03, 2026 at 01:25:15AM +0800, Zhenzhong Wu wrote: > Hi Shung-Hsi, ... > I ran the suggested checks with the same reproducer, where BAD means the > program ran and observed the unexpected error, and GOOD means no error was > observed: > > - latest 6.6.y, v6.6.142 (924b4a879cbb): BAD > - bpf-next at b93c55b4932d: GOOD > - bpf-next with the d028f87517d6 JNE refinement reverted: still GOOD > > So the issue still reproduces on the latest 6.6.y, but d028f87517d6 alone > does not explain why bpf-next passes. I'll do more narrowing and update the > candidate backport set accordingly. ... I think it possibly comes down to commit 4bf79f9be434e ("bpf: Track equal scalars history on per-instruction level") added in v6.12. Without that, the precise mark wasn't propogated (for scalars with the same ID), and that likely made the state comparison (invalidly) go through. Shung-Hsi ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-06-06 9:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260601180400.1381736-1-jt26wzz@gmail.com>
2026-06-02 5:47 ` [RFC PATCH 6.1.y 0/2] bpf: backport scalar not-equal tracking fixes Shung-Hsi Yu
2026-06-02 6:42 ` Shung-Hsi Yu
2026-06-02 9:17 ` Shung-Hsi Yu
2026-06-02 17:25 ` Zhenzhong Wu
2026-06-06 9:19 ` Shung-Hsi Yu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox