Re: [PATCH bpf-next 1/2] bpf: Reject callback subprogs invoke tailcall
From: Eduard Zingerman
Date: Mon Jul 13 2026 - 18:10:06 EST
On Sat, 2026-07-11 at 10:47 +0000, Pu Lehui wrote:
> From: Pu Lehui <pulehui@xxxxxxxxxx>
>
> Some JIT compilers, such as x86_64, rely on a register to pass the TCC.
> When subprograms of synchronous callback invoke tailcall, C helpers
> invoking bpf callback clobber this register, and the corrupted TCC may
> bypass the TCC limit, leading to infinite tailcall.
>
> Fix this by rejecting tailcall inside all subprogs of sync callback.
> This also cleanly consolidates the existing async and exception callback
> checks into a single unified `is_cb` check.
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Reported-by: Björn Töpel <bjorn@xxxxxxxxxx>
> Signed-off-by: Pu Lehui <pulehui@xxxxxxxxxx>
> ---
Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
[...]