Commit b8574f8
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, let's use
move_addr() instead to prevent subtle bugs.
(I observed this while debugging other issues with printk.)
Signed-off-by: Hengqi Chen <[email protected]>1 parent 45f4134 commit b8574f8
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | | - | |
| 1602 | + | |
1603 | 1603 | | |
1604 | 1604 | | |
1605 | 1605 | | |
| |||
1649 | 1649 | | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | | - | |
| 1652 | + | |
1653 | 1653 | | |
1654 | 1654 | | |
1655 | 1655 | | |
| |||
0 commit comments