]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: BPF: Enhance the bpf_arch_text_poke() function
authorChenghao Duan <duanchenghao@kylinos.cn>
Tue, 6 Jan 2026 02:55:02 +0000 (10:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:17:21 +0000 (10:17 +0100)
commite7a7d7e629c2abcc0ade47b148ebe71d5832ead9
tree80b402349d8dae289e5d90c84b5420d0b7a20d47
parent845306163962454083f97d9a2e22f67f94ac8e1f
LoongArch: BPF: Enhance the bpf_arch_text_poke() function

commit 73721d8676771c6c7b06d4e636cc053fc76afefd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/loongarch/net/bpf_jit.c