diff options
author | Hengqi Chen <hengqi.chen@gmail.com> | 2025-10-02 22:39:52 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2025-10-02 22:39:52 +0800 |
commit | ea645cfd3d5f74a2bd40a60003f113b3c467975d (patch) | |
tree | 808189c4c66143a67ab5f181830be7ed586464dd /net/unix/af_unix.c | |
parent | a04731cbee6e981afa4263289a0c0059c8b2e7b9 (diff) |
LoongArch: BPF: Make trampoline size stable
When attach fentry/fexit BPF programs, __arch_prepare_bpf_trampoline()
is called twice with different `struct bpf_tramp_image *im`:
bpf_trampoline_update()
-> arch_bpf_trampoline_size()
-> __arch_prepare_bpf_trampoline()
-> arch_prepare_bpf_trampoline()
-> __arch_prepare_bpf_trampoline()
Use move_imm() will emit unstable instruction sequences, so let's use
move_addr() instead to prevent subtle bugs.
(I observed this while debugging other issues with printk.)
Cc: stable@vger.kernel.org
Tested-by: Vincent Li <vincent.mc.li@gmail.com>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions