Re: [PATCH bpf-next v2] bpf: Fix bpf_loop() depth check to use 32-bit max for nr_loops

From: Alexei Starovoitov

Date: Mon Sep 28 2026 - 03:48:41 EST


On Mon, Sep 28, 2026 at 03:15 AM Ömer Mete Kaya <omermetekaya0@xxxxxxxxx> wrote:
> The verifier compares callback_depth (u32) against reg_umax(), which
> returns the 64-bit upper bound of R1. If the upper 32 bits of R1 are
> set, reg_umax() can be U64_MAX, causing the depth check to be
> ineffective and triggering excessive push_callback_call() invocations
> until the complexity limit is hit.
>
> Use reg_u32_max() instead. The change is sound for both runtime paths:

It's not a fix. Nothing is broken.

pls stop the spam.

pw-bot: cr