On Mon, Sep 03, 2018 at 03:59:44PM -0700, Andy Lutomirski wrote: > The SYSCALL64 trampoline has a couple of nice properties: > > - The usual sequence of SWAPGS followed by two GS-relative accesses to > set up RSP is somewhat slow because the GS-relative accesses need > to wait for SWAPGS to finish. The trampoline approach allows > RIP-relative accesses to set up RSP, which avoids the stall.
... > diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c > index 31341ae7309f..7e79154846c8 100644 > --- a/arch/x86/mm/pti.c > +++ b/arch/x86/mm/pti.c > @@ -434,11 +434,42 @@ static void __init pti_clone_p4d(unsigned long addr) > } > > /* > - * Clone the CPU_ENTRY_AREA into the user space visible page table. > + * Clone the CPU_ENTRY_AREA and associated data into the user space visible > + * page table. > */ > static void __init pti_clone_user_shared(void) > { > + unsigned cpu; Make that unsigned int cpu; Otherwise, patches removing complex code are always good! Reviewed-by: Borislav Petkov <b...@suse.de> -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.