On 05/10/2022 16:08, Beata Michalska wrote:
Playing around with syscall framework macros broke the syscall tracing badly, see: commit bb3fbc44e783 ("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.
Review branch: https://git.morello-project.org/Bea/linux/-/commits/morello/ftrace_syscalls/
BR B.
Beata Michalska (3): tracing/syscalls: Reshape arch_syscall_addr arm64:morello:tracing/syscalls: Get a grip on syscall tracing tracing/signal: Use explicit conversion instead of vague downcast
Tested-by: Zachary Leaf zachary.leaf@arm.com
Fixes build issues with CONFIG_FTRACE_SYSCALLS on Morello/arm64. Syscall tracing has been working on Morello board based on some limited testing.
Documentation/trace/ftrace-design.rst | 5 +++-- arch/arm64/include/asm/ftrace.h | 4 ++++ arch/arm64/include/asm/syscall_wrapper.h | 9 ++++++--- 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 | 24 +++++++++++++++--------- include/trace/events/signal.h | 4 ++-- kernel/trace/trace_syscalls.c | 4 +++- 10 files changed, 53 insertions(+), 21 deletions(-)