From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Eduard Zingerman" <eddyz87@gmail.com>, <bot+bpf-ci@kernel.org>,
<bpf@vger.kernel.org>, <ast@kernel.org>
Cc: <andrii@kernel.org>, <daniel@iogearbox.net>, <kernel-team@fb.com>,
<yonghong.song@linux.dev>, <martin.lau@kernel.org>,
<mason@kernel.org>, <ihor.solodrai@linux.dev>
Subject: Re: [PATCH bpf-next 02/11] bpf: do not intersect with current register range on clamp
Date: Sun, 25 Oct 2026 01:03:05 +0000 [thread overview]
Message-ID: <DMDIJ0LUPMZX.3B6KY51D9ZRB1@gmail.com> (raw)
In-Reply-To: <4656dc2d7b8749adb9c9b26490a3ef37aea58715.camel@gmail.com>
On Sat Oct 24, 2026 at 6:57 AM UTC, Eduard Zingerman wrote:
> On Sat, 2026-10-24 at 00:41 +0000, bot+bpf-ci@kernel.org wrote:
>
> ...
>
>> Since bisection can land on this commit, could that change be folded into
>> this patch or ordered before it?
>
> Commits should remain separate for documentation purposes.
> Full test suite passes on both.
>
>> A related question about the end of the series. cf18840bc068 only helps
>> when the current frame has no active loop. Consider states inside an inner
>> loop that is entered again on the second iteration of a terminating outer
>> loop. current_loop() finds the inner loop in both states, but its
>> entry_state differs, because handle_loop_entry_exit() splits a new one on
>> each entry. So the EXACT check runs, and loop_stack_safe() does not
>> compare entry_state.
>>
>> With the outer induction variable now the same on every outer iteration, a
>> program like the one below looks like it would still hit "infinite loop
>> detected" after cf18840bc068 (with the old code the outer induction
>> variable was [1..9] on the second outer iteration and the EXACT compare
>> failed):
>>
>> w1 = 1;
>> *(u32 *)(r10 - 8) = r1;
>> r6 = 0;
>> 1: r7 = 0;
>> 2: *(u32 *)(r10 - 4) = 1; /* fp-8 spill -> STACK_MISC */
>> r7 += 1;
>> if r7 < 3 goto 2b;
>> r6 += 1;
>> if r6 < 10 goto 1b;
>> r0 = *(u32 *)(r10 - 8);
>> exit;
>>
>> Is that case covered somewhere I missed?
>
> This example is valid. Need to relax the condition in the
> current_loop() or bpf_is_state_visited().
so you're going to respin it or follow up?
It's fine to ignore CI in patch 3.
We'll be removing states.c soon.
next prev parent reply other threads:[~2026-10-25 1:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 0:03 [PATCH bpf-next 00/11] bpf: fixes and follow-ups for 32-/64-bit scalar evolution Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 01/11] bpf: reject pointer operands for 32-bit recurrences/latches Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 02/11] bpf: do not intersect with current register range on clamp Eduard Zingerman
2026-10-24 0:41 ` bot+bpf-ci
2026-10-24 6:57 ` Eduard Zingerman
2026-10-25 1:03 ` Alexei Starovoitov [this message]
2026-10-25 5:10 ` Alexei Starovoitov
2026-10-26 18:32 ` Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 03/11] bpf: look for current loop in upper frames in states_equal() Eduard Zingerman
2026-10-24 0:27 ` sashiko-bot
2026-10-24 0:41 ` bot+bpf-ci
2026-10-24 0:03 ` [PATCH bpf-next 04/11] bpf: check the iteration count before the predicted exit value Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 05/11] bpf: (zext32 (zext32 X)) -> (zext32 X) SCEV simplification rule Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 06/11] bpf: print 32-bit SCEV bounds as 32-bit numbers Eduard Zingerman
2026-10-24 0:41 ` bot+bpf-ci
2026-10-24 0:03 ` [PATCH bpf-next 07/11] selftests/bpf: pointer operands for 32-bit recurrences/latches Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 08/11] selftests/bpf: cases with empty range error under old clamping logic Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 09/11] selftests/bpf: case reporting infinite loop w/o current_loop() changes Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 10/11] selftests/bpf: 32-bit copy of the counter compared at the latch Eduard Zingerman
2026-10-24 0:03 ` [PATCH bpf-next 11/11] selftests/bpf: Restore stack pointer subrange pruning coverage Eduard Zingerman
2026-10-24 5:11 ` [PATCH bpf-next 00/11] bpf: fixes and follow-ups for 32-/64-bit scalar evolution Alexei Starovoitov
2026-10-24 5:33 ` Eduard Zingerman
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=DMDIJ0LUPMZX.3B6KY51D9ZRB1@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
--cc=mason@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.