summaryrefslogtreecommitdiff
path: root/kernel/entry/syscall-common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-11-21 17:22:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-11-21 17:22:21 -0800
commit4843f6873f7c4835e62f2c73ba0fd538e57a2f22 (patch)
treeee620501a1ffbad9a83141e3a70154e1fe641040 /kernel/entry/syscall-common.c
downloadlinux-master.tar.gz
linux-master.zip
Merge tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctlgraftedHEADmaster
Pull sysctl fix from Joel Granados: "Fix sysctl jiffy / milliseconds conversion: - Writing a previously read value "X" shall keep the same "X" value - Remove truncation that was causing incorrect saturation of valid timeouts" * tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: sysctl: Do jiffy / ms conversion in ulong space
Diffstat (limited to 'kernel/entry/syscall-common.c')
-rw-r--r--kernel/entry/syscall-common.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/entry/syscall-common.c b/kernel/entry/syscall-common.c
new file mode 100644
index 000000000..b8eac9efb
--- /dev/null
+++ b/kernel/entry/syscall-common.c
@@ -0,0 +1,30 @@
+// 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