summaryrefslogtreecommitdiff
path: root/tools/include/linux
diff options
context:
space:
mode:
authorPu Lehui <pulehui@huawei.com>2026-07-16 12:01:56 +0000
committerEduard Zingerman <eddyz87@gmail.com>2026-07-16 17:46:25 -0700
commita41d0c30d764e086c62b049e806fd12df4f4acfc (patch)
treec36f28d31bb9e6457fb0e3ed21c6bd0d6eb0d0a4 /tools/include/linux
parent3513ea9dab6c1a3d2dc8e6160c41f690206948b6 (diff)
bpf: Reject callback subprogs invoke tailcall
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@kernel.org> Reported-by: Björn Töpel <bjorn@kernel.org> Signed-off-by: Pu Lehui <pulehui@huawei.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://patch.msgid.link/20260716120157.835937-3-pulehui@huaweicloud.com Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Diffstat (limited to 'tools/include/linux')
0 files changed, 0 insertions, 0 deletions