public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/7] Fix the failure issue of the module_attach test case
@ 2025-12-17  6:14 Chenghao Duan
  2025-12-17  6:14 ` [PATCH v4 1/7] LoongArch: ftrace: Refactor register restoration in ftrace_common_return Chenghao Duan
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Chenghao Duan @ 2025-12-17  6:14 UTC (permalink / raw)
  To: yangtiezhu, rostedt, mhiramat, mark.rutland, hengqi.chen,
	chenhuacai
  Cc: kernel, zhangtianyang, masahiroy, linux-kernel, loongarch, bpf,
	duanchenghao, youling.tang, jianghaoran, vincent.mc.li,
	linux-trace-kernel

v4:
My sincere apologies for the misunderstanding in my interpretation of
Tiezhu's reply in the v2 email thread. After the release of v3, Tiezhu
reminded me again of the importance of splitting the patches, and I am
very grateful for this. Below are the changes made for v4.

Split the patch titled "LoongArch: BPF: Enhance trampoline support for
kernel and module tracing" into the following smaller patches by
functionality to facilitate code reading and review, while ensuring the
code logic and modification locations remain unchanged:
"LoongArch: BPF: Enable and fix trampoline-based tracing for module functions"
"LoongArch: BPF: Save return address register ra to t0 before trampoline"
"LoongArch: BPF: Adjust the jump offset of tail calls"
"LoongArch: BPF: Enhance the bpf_arch_text_poke() function"

--------------------------Changelog------------------------------------
v3:
links: https://lore.kernel.org/all/20251216094753.1317231-1-duanchenghao@kylinos.cn/
1. Adjust the position of fixup_exception() in the patch "LoongArch:
Enable exception fixup for specific ADE": move its invocation to within
the code block wrapped by irqentry_enter()/irqentry_exit().

2. Add the relevant test items to the patch commit log.

3. Adjust the sequence of patches

With the exception of the patch "LoongArch: Enable exception fixup for
specific ADE", no source code changes have been made in the other
patches.

v2:
links: https://lore.kernel.org/all/20251212091103.1247753-1-duanchenghao@kylinos.cn/
Referring to Tiezhu's suggestion, split the v1 patch titled
"LoongArch: Modify the jump logic of the trampoline" into three parts:
 (1) ftrace code
 (2) sample test
 (3) bpf code
The code logic and implementation remain unchanged.

v1:
links: https://lore.kernel.org/all/20251209093405.1309253-1-duanchenghao@kylinos.cn/
The following test cases under the tools/testing/selftests/bpf/
directory have passed the test:

./test_progs -t module_attach
./test_progs -t module_fentry_shadow
./test_progs -t subprogs
./test_progs -t subprogs_extable
./test_progs -t tailcalls
./test_progs -t struct_ops -d struct_ops_multi_pages
./test_progs -t fexit_bpf2bpf
./test_progs -t fexit_stress
./test_progs -t module_fentry_shadow
./test_progs -t fentry_test/fentry
./test_progs -t fexit_test/fexit
./test_progs -t fentry_fexit
./test_progs -t modify_return
./test_progs -t fexit_sleep
./test_progs -t test_overhead
./test_progs -t trampoline_count

Chenghao Duan (7):
  LoongArch: ftrace: Refactor register restoration in
    ftrace_common_return
  LoongArch: Enable exception fixup for specific ADE subcode
  LoongArch: BPF: Enable and fix trampoline-based tracing for module
    functions
  LoongArch: BPF: Save return address register ra to t0 before
    trampoline
  LoongArch: BPF: Adjust the jump offset of tail calls
  LoongArch: BPF: Enhance the bpf_arch_text_poke() function
  LoongArch: ftrace: Adjust register stack restore order in direct call
    trampolines

 arch/loongarch/kernel/mcount_dyn.S          | 14 +++++---
 arch/loongarch/kernel/traps.c               |  9 ++++-
 arch/loongarch/net/bpf_jit.c                | 38 +++++++++++++++------
 samples/ftrace/ftrace-direct-modify.c       |  8 ++---
 samples/ftrace/ftrace-direct-multi-modify.c |  8 ++---
 samples/ftrace/ftrace-direct-multi.c        |  4 +--
 samples/ftrace/ftrace-direct-too.c          |  4 +--
 samples/ftrace/ftrace-direct.c              |  4 +--
 8 files changed, 59 insertions(+), 30 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2025-12-23  8:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17  6:14 [PATCH v4 0/7] Fix the failure issue of the module_attach test case Chenghao Duan
2025-12-17  6:14 ` [PATCH v4 1/7] LoongArch: ftrace: Refactor register restoration in ftrace_common_return Chenghao Duan
2025-12-17  6:55   ` bot+bpf-ci
2025-12-18  1:26     ` Chenghao Duan
2025-12-18 15:26       ` Chris Mason
2025-12-17  6:14 ` [PATCH v4 2/7] LoongArch: Enable exception fixup for specific ADE subcode Chenghao Duan
2025-12-17  6:14 ` [PATCH v4 3/7] LoongArch: BPF: Enable and fix trampoline-based tracing for module functions Chenghao Duan
2025-12-17  6:14 ` [PATCH v4 4/7] LoongArch: BPF: Save return address register ra to t0 before trampoline Chenghao Duan
2025-12-17  6:14 ` [PATCH v4 5/7] LoongArch: BPF: Adjust the jump offset of tail calls Chenghao Duan
2025-12-17  6:14 ` [PATCH v4 6/7] LoongArch: BPF: Enhance the bpf_arch_text_poke() function Chenghao Duan
2025-12-20 14:07   ` Hengqi Chen
2025-12-22  1:50     ` Chenghao Duan
2025-12-23  2:23       ` Hengqi Chen
2025-12-23  8:49         ` Huacai Chen
2025-12-17  6:14 ` [PATCH v4 7/7] LoongArch: ftrace: Adjust register stack restore order in direct call trampolines Chenghao Duan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox