summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2026-08-17 22:07:23 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2026-08-17 22:07:23 +0800
commit37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8 (patch)
treeb279888506bb2197cb6b6b6f44a3068dc333d24f /tools/lib/python
parentcd7e356b07a27e91394838cf3fb655862b519294 (diff)
downloadlinux-37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8.tar.gz
linux-37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8.zip
LoongArch: BPF: Refactor jump offset calculation in tail call
The old macro-based jmp_offset calculation derives the jump distance from a stale prior-pass code stride, which can lead to wrong branch offsets and soft lockups under extra JIT passes. Fix this by calculating the offset directly on the absolute target: "ctx->offset[insn + 1] - ctx->idx". To avoid a false 16-bit range check abort during size estimation, add a "ctx->image == NULL" guard to inject a safe dummy offset. Cc: stable@vger.kernel.org Fixes: cd39d9e6b7e4 ("LoongArch: BPF: Fix jump offset calculation in tailcall") Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions