[tip: core/entry] s390/syscall: Use enter_from_user_mode_randomize_stack()

tip-bot2 for Thomas Gleixner posted 1 patch 1 week, 6 days ago
arch/s390/kernel/syscall.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[tip: core/entry] s390/syscall: Use enter_from_user_mode_randomize_stack()
Posted by tip-bot2 for Thomas Gleixner 1 week, 6 days ago
The following commit has been merged into the core/entry branch of tip:

Commit-ID:     05a194d8bd005e0887a1e089bbbbd2e1a641638f
Gitweb:        https://git.kernel.org/tip/05a194d8bd005e0887a1e089bbbbd2e1a641638f
Author:        Thomas Gleixner <tglx@kernel.org>
AuthorDate:    Tue, 07 Jul 2026 21:06:23 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sun, 12 Jul 2026 12:38:01 +02:00

s390/syscall: Use enter_from_user_mode_randomize_stack()

enter_from_user_mode_randomize_stack() replaces enter_from_user_mode() and
the subsequent invocation of add_random_kstack_offset_irqsoff().

As a bonus this avoids the overhead of get/put_cpu_var() in
add_random_kstack_offset().

No functional change.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.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.030598804@kernel.org
---
 arch/s390/kernel/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
index 75d5a3c..73abda2 100644
--- a/arch/s390/kernel/syscall.c
+++ b/arch/s390/kernel/syscall.c
@@ -97,8 +97,8 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
 {
 	unsigned long nr;
 
-	enter_from_user_mode(regs);
-	add_random_kstack_offset();
+	enter_from_user_mode_randomize_stack(regs);
+
 	regs->psw = get_lowcore()->svc_old_psw;
 	regs->int_code = get_lowcore()->svc_int_code;
 	update_timer_sys();