Re: [patch 07/18] s390/syscall: Use enter_from_user_mode_randomize_stack()

Philippe Mathieu-Daudé <[email protected]> Thu, 9 Jul 2026 13:17:17 +0200
Newsgroups gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.ports.ppc64.devel,gmane.linux.ports.riscv,gmane.linux.ports.arm.kernel,gmane.linux.ports.alpha,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.uml.devel,gmane.linux.kernel.arc,gmane.linux.ports.hexagon,gmane.linux.ports.sparc,gmane.linux.documentation
Message-ID <[email protected]>
On 9/7/26 04:46, Jinjie Ruan wrote:
> 
> 
> On 7/8/2026 3:06 AM, Thomas Gleixner wrote:
>> 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 <[email protected]>
>> Cc: Sven Schnelle <[email protected]>
>> Cc: [email protected]
>> ---
>>   arch/s390/kernel/syscall.c |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> --- a/arch/s390/kernel/syscall.c
>> +++ b/arch/s390/kernel/syscall.c
>> @@ -97,8 +97,8 @@ void noinstr __do_syscall(struct pt_regs
>>   {
>>   	unsigned long nr;
>>   
>> -	enter_from_user_mode(regs);
>> -	add_random_kstack_offset();
>> +	enter_from_user_mode_randomize_stack(regs);
> 
> The #include <linux/randomize_kstack.h> can be removed.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>