Commit f9b6b41f authored by Chenghao Duan's avatar Chenghao Duan Committed by Huacai Chen
Browse files

LoongArch: BPF: Add basic bpf trampoline support



BPF trampoline is the critical infrastructure of the BPF subsystem,
acting as a mediator between kernel functions and BPF programs. Numerous
important features, such as using BPF program for zero overhead kernel
introspection, rely on this key component.

The related tests have passed, including the following technical points:
1. fentry
2. fmod_ret
3. fexit

The following related testcases passed on LoongArch:
sudo ./test_progs -a fentry_test/fentry
sudo ./test_progs -a fexit_test/fexit
sudo ./test_progs -a fentry_fexit
sudo ./test_progs -a modify_return
sudo ./test_progs -a fexit_sleep
sudo ./test_progs -a test_overhead
sudo ./test_progs -a trampoline_count

This issue was first reported by Geliang Tang in June 2024 while
debugging MPTCP BPF selftests on a LoongArch machine (see commit
eef0532e "selftests/bpf: Null checks for links in bpf_tcp_ca").
Geliang, Huacai, and Tiezhu then worked together to drive the
implementation of this feature, encouraging broader collaboration among
Chinese kernel engineers.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507100034.wXofj6VX-lkp@intel.com/


Reported-by: default avatarGeliang Tang <geliang@kernel.org>
Tested-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Tested-by: default avatarVincent Li <vincent.mc.li@gmail.com>
Co-developed-by: default avatarGeorge Guo <guodongtai@kylinos.cn>
Signed-off-by: default avatarGeorge Guo <guodongtai@kylinos.cn>
Signed-off-by: default avatarChenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 9fbd18cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment