On 05/10/2022 17: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.
Looks perfectly reasonable to me, using __weak this way is not very robust.
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.
I've got a suggestion to split that patch and a few other small things, otherwise I think that series is in good shape :)
Kevin
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
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(-)