On 26/11/2025 08:14, Jinjie Ruan wrote: > The generic syscall syscall_exit_work() has the following content: > > | audit_syscall_exit(regs) > | trace_sys_exit(regs, ...) > | ptrace_report_syscall_exit(regs, step) > > The generic syscall syscall_exit_to_user_mode_work() has > the following form: > > | unsigned long work = READ_ONCE(current_thread_info()->syscall_work) > | rseq_syscall() > | if (unlikely(work & SYSCALL_WORK_EXIT)) > | syscall_exit_work(regs, work) > > In preparation for moving arm64 over to the generic entry code, > rework el0_svc_common() as below: > > - Rename syscall_trace_exit() to syscall_exit_work(). > > - Add syscall_exit_to_user_mode_prepare() function to replace > the combination of read_thread_flags() and syscall_exit_work(), > also move the syscall exit check logic into it. Move has_syscall_work() > helper into asm/syscall.h for reuse. > > - As currently rseq_syscall() is always called and itself is controlled > by the CONFIG_DEBUG_RSEQ macro, so the CONFIG_DEBUG_RSEQ check > is removed. > > Signed-off-by: Jinjie Ruan <[email protected]>
Reviewed-by: Kevin Brodsky <[email protected]>

