Messages in this thread | | | Date | Fri, 7 Sep 2018 11:35:57 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH v2 3/3] x86/pti/64: Remove the SYSCALL64 entry trampoline |
| |
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 <bp@suse.de>
-- Regards/Gruss, Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
| |