For the syscall framework to be able to recognize capabilities as a valid syscall return type, alterations were required, ending-up in modifying syscall wrappers and basically injecting an additional argument, that specifies the expected return type for given syscall handler. For some reason, SYSCALL_METADATA macro slipped under the radar, leaving it broken for arm64. The extra argument passed, crippled the overall logic for the tracing metadata macro, resulting in compile-time errors when CONFIG_FTRACE_SYSCALLS was enabled. This has been partially addressed by:
commit ("tracing/syscalls: Allow amending metadata macro arguments")
still, though, leaving SYSCALL_METADATA trying to process (unconsciously) the return type argument, which is bogus and leaves the tracing metadata in an overall mess. Make a full use of the above mentioned changes and drop the additional argument from the tracing metadata macro, restoring its original logic.
Fixes: ("arm64/syscalls: Allow syscalls to return capabilities") Signed-off-by: Beata Michalska beata.michalska@arm.com --- arch/arm64/include/asm/syscall_wrapper.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm64/include/asm/syscall_wrapper.h b/arch/arm64/include/asm/syscall_wrapper.h index 97e08c4a6520..30d4fd12e114 100644 --- a/arch/arm64/include/asm/syscall_wrapper.h +++ b/arch/arm64/include/asm/syscall_wrapper.h @@ -142,6 +142,10 @@ struct pt_regs; #define __SYSCALL_ANNOTATE(name, ret_type) name, __SYSCALL_RET_T##ret_type #define SYSCALL_PREP(name, ...) __SYSCALL_ANNOTATE(_##name, __VA_ARGS__)
+#ifdef CONFIG_FTRACE_SYSCALLS +#define SYSCALL_METADATA(x, name, ret_type, ...) \ + __SYSCALL_METADATA(x, name, __VA_ARGS__) +#endif /* * Some syscalls with no parameters return valid capabilities, so __SYSCALL_DEFINE0 * is added to handle such cases.