diff options
| author | Thomas Gleixner <tglx@kernel.org> | 2026-07-12 23:25:22 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-07-20 20:38:40 +0200 |
| commit | dfc98c7a46424683326c8d8ffc70e81548c59fdb (patch) | |
| tree | 325b240d1cda426ea6569b64b8f0694f314c388d /include/linux | |
| parent | 6f25517010ddd3f8080d7e06b9b1cb1b64b73772 (diff) | |
entry: Rework trace_syscall_enter()
Reread the syscall number from pt_regs and stop returning the eventually
modified syscall number.
That moves the reread to the end of syscall_trace_enter() and prepares for
moving it to the call site.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michal Suchánek <msuchanek@suse.de>
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20260712141346.639115923@kernel.org
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/entry-common.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 78cfeeb7a5f0..38d148477729 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -58,7 +58,7 @@ static __always_inline bool arch_ptrace_report_syscall_permit_entry(struct pt_re } #endif -long trace_syscall_enter(struct pt_regs *regs, long syscall); +void trace_syscall_enter(struct pt_regs *regs); void trace_syscall_exit(struct pt_regs *regs, long ret); void syscall_enter_audit(struct pt_regs *regs); @@ -99,16 +99,14 @@ static __always_inline long syscall_trace_enter(struct pt_regs *regs, unsigned l return -1L; } - /* Either of the above might have changed the syscall number */ - syscall = syscall_get_nr(current, regs); - if (unlikely(work & SYSCALL_WORK_SYSCALL_TRACEPOINT)) - syscall = trace_syscall_enter(regs, syscall); + trace_syscall_enter(regs); if (unlikely(audit_context())) syscall_enter_audit(regs); - return syscall; + /* Either of the above might have changed the syscall number */ + return syscall_get_nr(current, regs); } /** |
