lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] x86/entry/64: Use the TSS sp2 slot for SYSCALL/SYSRET scratch space
On Mon, Sep 03, 2018 at 03:59:43PM -0700, Andy Lutomirski wrote:
> In the non-trampoline SYSCALL64 path, we use a percpu variable to
> temporarily store the user RSP value. Instead of a separate
> variable, use the otherwise unused sp2 slot in the TSS. This will
> improve cache locality, as the sp1 slot is already used in the same
> code to find the kernel stack. It will also simplify a future
> change to make the non-trampoline path work in PTI mode.
>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
> arch/x86/entry/entry_64.S | 16 +++++++++-------
> arch/x86/include/asm/processor.h | 6 ++++++
> arch/x86/kernel/asm-offsets.c | 3 ++-
> arch/x86/kernel/process_64.c | 2 --
> arch/x86/xen/xen-asm_64.S | 8 +++++---
> 5 files changed, 22 insertions(+), 13 deletions(-)

Reviewed-by: Borislav Petkov <bp@suse.de>

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2018-09-07 10:01    [W:0.072 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site