summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@kernel.org>2026-07-07 21:06:32 +0200
committerThomas Gleixner <tglx@kernel.org>2026-07-12 12:38:01 +0200
commitbad2a27ba8c4a6bd2c47e598898d9dbd0f98511f (patch)
tree5f78bf3ac69d925f72defee44ca017f27fba0ca5 /include
parent9d311796e2ce75b3aaded2719a01d7e248c3a24f (diff)
downloadlinux-bad2a27ba8c4a6bd2c47e598898d9dbd0f98511f.tar.gz
linux-bad2a27ba8c4a6bd2c47e598898d9dbd0f98511f.zip
entry: Remove syscall_enter_from_user_mode()
All architecture use either: nr = syscall_enter_from_user_mode_randomize_stack(regs, nr); or enter_from_user_mode_randomize_stack(regs); nr = syscall_enter_from_user_mode_work(regs, nr); Remove the now unused function. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Tested-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Link: https://patch.msgid.link/20260707190254.132654198@kernel.org
Diffstat (limited to 'include')
-rw-r--r--include/linux/entry-common.h40
-rw-r--r--include/linux/irq-entry-common.h6
2 files changed, 7 insertions, 39 deletions
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
index 166b1ed9a9c0..c0f6464ca96b 100644
--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -20,7 +20,7 @@
#endif
/*
- * SYSCALL_WORK flags handled in syscall_enter_from_user_mode()
+ * SYSCALL_WORK flags handled in syscall_enter_from_user_mode_work()
*/
#define SYSCALL_WORK_ENTER (SYSCALL_WORK_SECCOMP | \
SYSCALL_WORK_SYSCALL_TRACEPOINT | \
@@ -205,42 +205,10 @@ do { \
_ret; \
})
-/**
- * syscall_enter_from_user_mode - Establish state and check and handle work
- * before invoking a syscall
- * @regs: Pointer to currents pt_regs
- * @syscall: The syscall number
- *
- * Invoked from architecture specific syscall entry code with interrupts
- * disabled. The calling code has to be non-instrumentable. When the
- * function returns all state is correct, interrupts are enabled and the
- * subsequent functions can be instrumented.
- *
- * This is the combination of enter_from_user_mode() and
- * syscall_enter_from_user_mode_work() to be used when there is no
- * architecture specific work to be done between the two.
- *
- * Returns: The original or a modified syscall number. See
- * syscall_enter_from_user_mode_work() for further explanation.
- */
-static __always_inline long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall)
-{
- long ret;
-
- enter_from_user_mode(regs);
-
- instrumentation_begin();
- local_irq_enable();
- ret = syscall_enter_from_user_mode_work(regs, syscall);
- instrumentation_end();
-
- return ret;
-}
-
/*
- * If SYSCALL_EMU is set, then the only reason to report is when
- * SINGLESTEP is set (i.e. PTRACE_SYSEMU_SINGLESTEP). This syscall
- * instruction has been already reported in syscall_enter_from_user_mode().
+ * If SYSCALL_EMU is set, then the only reason to report is when SINGLESTEP is
+ * set (i.e. PTRACE_SYSEMU_SINGLESTEP). This syscall instruction has been
+ * already reported in syscall_enter_from_user_mode_work().
*/
static __always_inline bool report_single_step(unsigned long work)
{
diff --git a/include/linux/irq-entry-common.h b/include/linux/irq-entry-common.h
index 1fabf0f5ea8e..0bb6c03481fa 100644
--- a/include/linux/irq-entry-common.h
+++ b/include/linux/irq-entry-common.h
@@ -49,9 +49,9 @@
* Defaults to an empty implementation. Can be replaced by architecture
* specific code.
*
- * Invoked from syscall_enter_from_user_mode() in the non-instrumentable
- * section. Use __always_inline so the compiler cannot push it out of line
- * and make it instrumentable.
+ * Invoked from enter_from_user_mode() in the non-instrumentable section. Use
+ * __always_inline so the compiler cannot push it out of line and make it
+ * instrumentable.
*/
static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs);