Commit 3d770bd
LoongArch: BPF: No text_poke() for kernel text
The current implementation of bpf_arch_text_poke() requires 5 nops
at patch site which is not applicable for kernel/module functions.
Because LoongArch reserves ONLY 2 nops at the function entry. With
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y, this can be done by ftrace
instead.
See the following commit for details:
* commit b91e014 ("bpf: Make BPF trampoline use register_ftrace_direct() API")
* commit 9cdc3b6 ("LoongArch: ftrace: Add direct call support")
Cc: [email protected]
Tested-by: Vincent Li <[email protected]>
Signed-off-by: Hengqi Chen <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>1 parent b0f50dc commit 3d770bd
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | | - | |
1296 | | - | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1297 | 1299 | | |
1298 | 1300 | | |
1299 | 1301 | | |
| |||
0 commit comments