Re: [PATCH bpf v2 2/2] selftests/bpf: Add tests for bpf_throw lock leak from subprogs

From: Kumar Kartikeya Dwivedi

Date: Sat Mar 21 2026 - 14:54:01 EST


On Fri, 20 Mar 2026 at 01:08, Ihor Solodrai <ihor.solodrai@xxxxxxxxx> wrote:
>
> Add test cases to ensure the verifier correctly rejects bpf_throw from
> subprogs when RCU, preempt, or IRQ locks are held:
>
> * reject_subprog_rcu_lock_throw: subprog acquires bpf_rcu_read_lock and
> then calls bpf_throw
> * reject_subprog_throw_preempt_lock: always-throwing subprog called while
> caller holds bpf_preempt_disable
> * reject_subprog_throw_irq_lock: always-throwing subprog called while
> caller holds bpf_local_irq_save
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Ihor Solodrai <ihor.solodrai@xxxxxxxxx>
> ---

Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>

> [...]