]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: BPF: Enhance the bpf_arch_text_poke() function
authorChenghao Duan <duanchenghao@kylinos.cn>
Wed, 31 Dec 2025 07:19:21 +0000 (15:19 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 31 Dec 2025 07:19:21 +0000 (15:19 +0800)
commit73721d8676771c6c7b06d4e636cc053fc76afefd
tree6d780fc13cdbde85daf4da92984b9cb6f3b96c16
parent26138762d9a27a7f1c33f467c4123c600f64a36e
LoongArch: BPF: Enhance the bpf_arch_text_poke() function

Enhance the bpf_arch_text_poke() function to enable accurate location
of BPF program entry points.

When modifying the entry point of a BPF program, skip the "move t0, ra"
instruction to ensure the correct logic and copy of the jump address.

Cc: stable@vger.kernel.org
Fixes: 677e6123e3d2 ("LoongArch: BPF: Disable trampoline for kernel module function trace")
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/net/bpf_jit.c