Commit e7a7d7e
LoongArch: BPF: Enhance the bpf_arch_text_poke() function
commit 73721d8 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: 677e612 ("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>1 parent 8453061 commit e7a7d7e
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
1310 | 1314 | | |
1311 | 1315 | | |
1312 | 1316 | | |
1313 | 1317 | | |
1314 | 1318 | | |
1315 | 1319 | | |
1316 | 1320 | | |
1317 | | - | |
| 1321 | + | |
1318 | 1322 | | |
1319 | 1323 | | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
1320 | 1335 | | |
1321 | 1336 | | |
1322 | 1337 | | |
| |||
0 commit comments