Re: [PATCH v1 0/2] LoongArch: BPF: per-CPU addr MOV and timed may_goto

From: Tiezhu Yang

Date: Mon Jun 15 2026 - 05:13:18 EST


On 2026/6/13 上午11:09, Huacai Chen wrote:
Hi, Tiezhu and Hengqi,

Any comments about this series?

This is a preliminary review during the current merge window.

Based on the DWARF for the LoongArch Architecture specification,
GCC disassembly, the kernel's ORC definition (unwind_orc.c), and
the BPF JIT stack layout defined in build_prologue(), the saving
position of $ra in your trampoline is incorrect.

build_prologue() explicitly shows that LoongArch BPF JIT expects
$ra to be stored at the highest slot right below the original $sp.
Furthermore, the ORC unwinder strictly mandates .ra_offset = -8
(PREV_SP - 8). Storing $ra at 0($sp) (which is PREV_SP - 64)
breaks both JIT conventions and kernel stack unwinding.

Since we are currently in the Merge Window, please take your time
to rebase this patchset against the latest tree and send a v2 after
the merge window closes (post -rc1), and please wait for more time
to get more comments.

Thanks,
Tiezhu