mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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
31 lines
684 B
C
31 lines
684 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/audit.h>
|
|
#include <linux/entry-common.h>
|
|
|
|
#define CREATE_TRACE_POINTS
|
|
#include <trace/events/syscalls.h>
|
|
|
|
/* Out of line to prevent tracepoint code duplication */
|
|
|
|
void trace_syscall_enter(struct pt_regs *regs)
|
|
{
|
|
trace_sys_enter(regs, syscall_get_nr(current, regs));
|
|
}
|
|
|
|
void trace_syscall_exit(struct pt_regs *regs, long ret)
|
|
{
|
|
trace_sys_exit(regs, ret);
|
|
}
|
|
|
|
#ifdef CONFIG_AUDITSYSCALL
|
|
void syscall_enter_audit(struct pt_regs *regs)
|
|
{
|
|
long syscall = syscall_get_nr(current, regs);
|
|
unsigned long args[6];
|
|
|
|
syscall_get_arguments(current, regs, args);
|
|
__audit_syscall_entry(syscall, args[0], args[1], args[2], args[3]);
|
|
}
|
|
#endif
|