Playing around with syscall framework macros broke the syscall tracing badly, see: commit ("arm64/syscalls: Allow syscalls to return capabilities") and: https://git.morello-project.org/morello/kernel/linux/-/issues/35 for the corresponding bug report.
This series in an attempt to remedy that. The first patch does some rather controversial thing, but there is already a precedent for that (as of ARCH_HAS_SYSCALL_MATCH_SYM_NAME), so one could say it can be somehow exonerated.
The second one tries to get the SYSCALL_METADATA macro aligned with the changes that caused the issue in the first place and, sadly, it is touching other archs code, though the changes are minimal and safe.
Note: checkpatch will complain about few things but those are to be ignored.
Tracing selftests seem to be happy with the changes. Also verified with some random syscall events.
v3: - further splitting of patches ([PATCH 3/4] from v2) - aligning the order of #ifdef defines
v2: - split [PATCH 2/3] into generic and Morello specific changes - added dependency on CONFIG_FTRACE_SYSCALLS for ARCH_HAS_SYSCALL_ADDR - improved (hopefully) commit message for previous PATCH 2-3 - small formatting clean-up
Review branch: https://git.morello-project.org/Bea/linux/-/commits/morello/ftrace_syscalls_...
Beata Michalska (5): tracing/syscalls: Reshape arch_syscall_addr tracing/syscalls: Allow amending metadata macro arguments arm64/syscalls: Fix syscalls tracing arm64: morello: ftrace: Use dedicated arch_syscall_addr tracing/signal: Use explicit conversion instead of vague downcast
Documentation/trace/ftrace-design.rst | 5 +++-- arch/arm64/include/asm/ftrace.h | 4 ++++ arch/arm64/include/asm/syscall_wrapper.h | 8 ++++++-- arch/arm64/kernel/syscall.c | 12 ++++++++++++ arch/mips/include/asm/ftrace.h | 4 ++++ arch/s390/include/asm/syscall_wrapper.h | 6 +++--- arch/x86/include/asm/syscall_wrapper.h | 2 +- include/linux/syscalls.h | 13 +++++++++---- include/trace/events/signal.h | 4 ++-- kernel/trace/trace_syscalls.c | 4 +++- 10 files changed, 47 insertions(+), 15 deletions(-)