On Tue, 2024-06-18 at 11:42 -0700, Alexei Starovoitov wrote: > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > When the following program is processed by the verifier: > L1: may_goto L2 > goto L1 > L2: w0 = 0 > exit > > the may_goto insn is first converted to: > L1: r11 = *(u64 *)(r10 -8) > if r11 == 0x0 goto L2 > r11 -= 1 > *(u64 *)(r10 -8) = r11 > goto L1 > L2: w0 = 0 > exit [...] > > Reported-by: Zac Ecob <zacecob@xxxxxxxxxxxxxx> > Closes: https://lore.kernel.org/bpf/CAADnVQJ_WWx8w4b=6Gc2EpzAjgv+6A0ridnMz2TvS2egj4r3Gw@xxxxxxxxxxxxxx/ > Fixes: 011832b97b31 ("bpf: Introduce may_goto instruction") > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > --- A tricky corner case indeed. We should probably switch to normal basic blocks one day... Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>