From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@kernel.org>,
"Mukesh Kumar Chaurasiya (IBM)" <mkchauras@gmail.com>,
Radu Rendec <radu@rendec.net>,
Jinjie Ruan <ruanjinjie@huawei.com>,
philmd@oss.qualcomm.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip: core/entry] entry: Use syscall number instead of rereading it
Date: Sun, 12 Jul 2026 12:44:00 -0000 [thread overview]
Message-ID: <178386024091.1844600.12038801060764636502.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260707190254.181086755@kernel.org>
The following commit has been merged into the core/entry branch of tip:
Commit-ID: 8af25d0a2e465f3cb73c47c605fddd1664ee79b2
Gitweb: https://git.kernel.org/tip/8af25d0a2e465f3cb73c47c605fddd1664ee79b2
Author: Thomas Gleixner <tglx@kernel.org>
AuthorDate: Tue, 07 Jul 2026 21:06:36 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sun, 12 Jul 2026 12:38:01 +02:00
entry: Use syscall number instead of rereading it
rseq_syscall_enter_work() is invoked before the syscall number can be
modified. So there is no point in rereading it from pt_regs.
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Link: https://patch.msgid.link/20260707190254.181086755@kernel.org
---
include/linux/entry-common.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
index c0f6464..c837352 100644
--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -70,9 +70,10 @@ static inline void syscall_enter_audit(struct pt_regs *regs, long syscall)
}
}
-static __always_inline long syscall_trace_enter(struct pt_regs *regs, unsigned long work)
+static __always_inline long syscall_trace_enter(struct pt_regs *regs, unsigned long work,
+ long syscall)
{
- long syscall, ret = 0;
+ long ret = 0;
/*
* Handle Syscall User Dispatch. This must comes first, since
@@ -90,7 +91,7 @@ static __always_inline long syscall_trace_enter(struct pt_regs *regs, unsigned l
* through hrtimer_interrupt().
*/
if (work & SYSCALL_WORK_SYSCALL_RSEQ_SLICE)
- rseq_syscall_enter_work(syscall_get_nr(current, regs));
+ rseq_syscall_enter_work(syscall);
/* Handle ptrace */
if (work & (SYSCALL_WORK_SYSCALL_TRACE | SYSCALL_WORK_SYSCALL_EMU)) {
@@ -145,7 +146,7 @@ static __always_inline long syscall_enter_from_user_mode_work(struct pt_regs *re
unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
if (work & SYSCALL_WORK_ENTER)
- syscall = syscall_trace_enter(regs, work);
+ syscall = syscall_trace_enter(regs, work, syscall);
return syscall;
}
next prev parent reply other threads:[~2026-07-12 12:44 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 19:05 [patch 00/18] entry: Consolidate and rework syscall entry handling Thomas Gleixner
2026-07-07 19:05 ` [patch 01/18] powerpc: Move stack randomization after syscall_enter_from_user_mode() Thomas Gleixner
2026-07-08 14:07 ` Shrikanth Hegde
2026-07-08 17:22 ` Radu Rendec
2026-07-09 1:20 ` Jinjie Ruan
2026-07-09 11:12 ` Philippe Mathieu-Daudé
2026-07-09 18:32 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 02/18] randomize_kstack: Provide add_random_kstack_offset_irqsoff() Thomas Gleixner
2026-07-08 17:24 ` Radu Rendec
2026-07-09 2:13 ` Jinjie Ruan
2026-07-09 16:23 ` Kees Cook
2026-07-09 18:34 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 03/18] entry: Provide [syscall_]enter_from_user_mode_randomize_stack() Thomas Gleixner
2026-07-08 17:26 ` Radu Rendec
2026-07-09 2:34 ` Jinjie Ruan
2026-07-09 3:46 ` Jinjie Ruan
2026-07-09 11:15 ` Philippe Mathieu-Daudé
2026-07-09 20:16 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 04/18] loongarch/syscall: Use syscall_enter_from_user_mode_randomize_stack() Thomas Gleixner
2026-07-08 18:37 ` Radu Rendec
2026-07-09 2:37 ` Jinjie Ruan
2026-07-09 11:15 ` Philippe Mathieu-Daudé
2026-07-09 18:40 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 05/18] powerpc/syscall: " Thomas Gleixner
2026-07-08 18:35 ` Radu Rendec
2026-07-09 2:38 ` Jinjie Ruan
2026-07-09 11:16 ` Philippe Mathieu-Daudé
2026-07-09 18:41 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 06/18] riscv/syscall: " Thomas Gleixner
2026-07-08 20:57 ` Radu Rendec
2026-07-09 2:38 ` Jinjie Ruan
2026-07-09 11:16 ` Philippe Mathieu-Daudé
2026-07-09 18:42 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-13 7:06 ` [patch 06/18] " Guo Ren
2026-07-07 19:06 ` [patch 07/18] s390/syscall: Use enter_from_user_mode_randomize_stack() Thomas Gleixner
2026-07-08 6:47 ` Sven Schnelle
2026-07-08 20:57 ` Radu Rendec
2026-07-09 2:39 ` Jinjie Ruan
2026-07-09 2:46 ` Jinjie Ruan
2026-07-09 11:17 ` Philippe Mathieu-Daudé
2026-07-09 18:43 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 08/18] x86/syscall: Use [syscall_]enter_from_user_mode_randomize_stack() Thomas Gleixner
2026-07-08 20:59 ` Radu Rendec
2026-07-09 2:44 ` Jinjie Ruan
2026-07-09 11:18 ` Philippe Mathieu-Daudé
2026-07-09 18:45 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 09/18] entry: Remove syscall_enter_from_user_mode() Thomas Gleixner
2026-07-08 21:21 ` Radu Rendec
2026-07-08 22:08 ` Thomas Gleixner
2026-07-09 2:49 ` Jinjie Ruan
2026-07-09 18:49 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 10/18] entry: Use syscall number instead of rereading it Thomas Gleixner
2026-07-08 21:39 ` Radu Rendec
2026-07-09 2:55 ` Jinjie Ruan
2026-07-09 11:20 ` Philippe Mathieu-Daudé
2026-07-09 11:22 ` Philippe Mathieu-Daudé
2026-07-09 18:50 ` Mukesh Kumar Chaurasiya
2026-07-12 12:44 ` tip-bot2 for Thomas Gleixner [this message]
2026-07-07 19:06 ` [patch 11/18] seccomp, treewide: Rename and convert __secure_computing() to return boolean Thomas Gleixner
2026-07-08 1:43 ` Jinjie Ruan
2026-07-08 9:15 ` Thomas Gleixner
2026-07-08 16:04 ` Oleg Nesterov
2026-07-08 21:49 ` Thomas Gleixner
2026-07-09 16:22 ` Kees Cook
2026-07-09 19:10 ` Mukesh Kumar Chaurasiya
2026-07-12 12:43 ` [tip: core/entry] " tip-bot2 for Jinjie Ruan
2026-07-07 19:06 ` [patch 12/18] ptrace, treewide: Rename ptrace_report_syscall_entry() to ptrace_report_syscall_permit_entry() Thomas Gleixner
2026-07-08 15:46 ` Oleg Nesterov
2026-07-09 1:41 ` Jinjie Ruan
2026-07-09 8:41 ` Geert Uytterhoeven
2026-07-09 17:03 ` Radu Rendec
2026-07-09 19:22 ` Mukesh Kumar Chaurasiya
2026-07-10 10:42 ` Michal Suchánek
2026-07-10 11:16 ` Oleg Nesterov
2026-07-12 12:43 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:06 ` [patch 13/18] entry: Make trace_syscall_enter() return type bool Thomas Gleixner
2026-07-08 15:52 ` Michal Suchánek
2026-07-08 20:34 ` Thomas Gleixner
2026-07-08 23:14 ` Thomas Gleixner
2026-07-09 16:26 ` David Laight
2026-07-10 11:01 ` Michal Suchánek
2026-07-10 11:40 ` Oleg Nesterov
2026-07-10 12:32 ` Michal Suchánek
2026-07-10 12:52 ` Oleg Nesterov
2026-07-10 15:20 ` Michal Suchánek
2026-07-11 20:33 ` Thomas Gleixner
2026-07-14 8:20 ` Michal Suchánek
2026-07-07 19:06 ` [patch 14/18] entry: Make return type of syscall_trace_enter() bool Thomas Gleixner
2026-07-09 19:36 ` Mukesh Kumar Chaurasiya
2026-07-07 19:06 ` [patch 15/18] x86/entry: Make syscall functions static Thomas Gleixner
2026-07-09 1:47 ` Jinjie Ruan
2026-07-09 19:43 ` Mukesh Kumar Chaurasiya
2026-07-12 12:43 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:07 ` [patch 16/18] x86/entry: Get rid of the sys_ni_syscall() indirection Thomas Gleixner
2026-07-09 2:03 ` Jinjie Ruan
2026-07-12 12:43 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:07 ` [patch 17/18] x86/entry: Simplify the syscall number logic Thomas Gleixner
2026-07-12 12:43 ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-07 19:07 ` [patch 18/18] entry, treewide: Make syscall_enter_from_user_mode[_work]() indicate syscall execution Thomas Gleixner
2026-07-08 5:21 ` Shrikanth Hegde
2026-07-08 9:16 ` Thomas Gleixner
2026-07-09 19:49 ` Mukesh Kumar Chaurasiya
2026-07-09 20:15 ` [patch 00/18] entry: Consolidate and rework syscall entry handling Mukesh Kumar Chaurasiya
2026-07-11 12:29 ` Magnus Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178386024091.1844600.12038801060764636502.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mkchauras@gmail.com \
--cc=philmd@oss.qualcomm.com \
--cc=radu@rendec.net \
--cc=ruanjinjie@huawei.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox