Commit 3d770bd1 authored by Hengqi Chen's avatar Hengqi Chen Committed by Huacai Chen
Browse files

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 b91e014f ("bpf: Make BPF trampoline use register_ftrace_direct() API")
  * commit 9cdc3b6a ("LoongArch: ftrace: Add direct call support")

Cc: stable@vger.kernel.org
Tested-by: default avatarVincent Li <vincent.mc.li@gmail.com>
Signed-off-by: default avatarHengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent b0f50dc0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment