bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Support trampoline for LoongArch
@ 2025-06-18 10:50 Chenghao Duan
  2025-06-18 10:50 ` [PATCH v2 1/4] LoongArch: BPF: The operation commands needed to add a trampoline Chenghao Duan
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Chenghao Duan @ 2025-06-18 10:50 UTC (permalink / raw)
  To: ast, daniel, andrii, yangtiezhu, hengqi.chen, chenhuacai
  Cc: martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
	sdf, haoluo, jolsa, kernel, linux-kernel, loongarch, bpf,
	guodongtai, duanchenghao, youling.tang, jianghaoran

v2:
1. Change the fixmap in the instruction copy function to set_memory_xxx.

2. Change the implementation method of the following code.
	- arch_alloc_bpf_trampoline
	- arch_free_bpf_trampoline
	Use the BPF core's allocation and free functions.
	
	- bpf_arch_text_invalidate
	Operate with the function larch_insn_text_copy that carries
	memory attribute modifications.

3. Correct the incorrect code formatting.

-----------------------------------------------------------------------
Historical Version:

v1:
Support trampoline for LoongArch. The following feature tests have been
completed:
	1. fentry
	2. fexit
	3. fmod_ret

TODO: The support for the struct_ops feature will be provided in
subsequent patches.

URL for version v1:
https://lore.kernel.org/all/20250611035952.111182-1-duanchenghao@kylinos.cn/
-----------------------------------------------------------------------

Chenghao Duan (4):
  LoongArch: BPF: The operation commands needed to add a trampoline
  LoongArch: BPF: Add bpf_arch_text_poke support for Loongarch
  LoongArch: BPF: Add bpf trampoline support for Loongarch
  LoongArch: BPF: Update the code to rename validate_code to
    validate_ctx.

 arch/loongarch/include/asm/inst.h |   3 +
 arch/loongarch/kernel/inst.c      |  57 ++++
 arch/loongarch/net/bpf_jit.c      | 490 +++++++++++++++++++++++++++++-
 arch/loongarch/net/bpf_jit.h      |   6 +
 4 files changed, 555 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-26  3:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 10:50 [PATCH v2 0/4] Support trampoline for LoongArch Chenghao Duan
2025-06-18 10:50 ` [PATCH v2 1/4] LoongArch: BPF: The operation commands needed to add a trampoline Chenghao Duan
2025-06-26  1:39   ` Hengqi Chen
2025-06-26  3:54     ` Chenghao Duan
2025-06-18 10:50 ` [PATCH v2 2/4] LoongArch: BPF: Add bpf_arch_text_poke support for Loongarch Chenghao Duan
2025-06-19 15:14   ` Huacai Chen
2025-06-18 10:50 ` [PATCH v2 3/4] LoongArch: BPF: Add bpf trampoline " Chenghao Duan
2025-06-18 10:50 ` [PATCH v2 4/4] LoongArch: BPF: Update the code to rename validate_code to validate_ctx Chenghao Duan
2025-06-19 15:15   ` Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).