Re: [patch 06/18] riscv/syscall: Use syscall_enter_from_user_mode_randomize_stack()
Philippe Mathieu-Daudé <[email protected]> Thu, 9 Jul 2026 13:16:51 +0200
| Newsgroups | gmane.linux.uml.devel,gmane.linux.kernel,gmane.linux.ports.riscv,gmane.linux.ports.ppc64.devel,gmane.linux.ports.arm.kernel,gmane.linux.ports.alpha,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.kernel.arc,gmane.linux.ports.hexagon,gmane.linux.ports.sparc,gmane.linux.kernel.cross-arch,gmane.linux.documentation |
|---|---|
| Message-ID | <[email protected]> |
On 7/7/26 21:06, Thomas Gleixner wrote: > syscall_enter_from_user_mode_randomize_stack() replaces > syscall_enter_from_user_mode() and the subsequent invocation of > add_random_kstack_offset(). > > The advantage is that it applies the stack randomization right after > enter_from_user_mode() and thereby avoids the overhead of get/put_cpu_var() > as that code is invoked with interrupts disabled. > > No functional change. > > Signed-off-by: Thomas Gleixner <[email protected]> > Cc: Paul Walmsley <[email protected]> > Cc: Palmer Dabbelt <[email protected]> > Cc: [email protected] > --- > arch/riscv/kernel/traps.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <[email protected]>