lkml.org 
[lkml]   [2015]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] x86: entry_64.S: steps towards simpler iret frame handling
Date
These changes make SYSENTER64 code path save flags and user's
stack pointer in pt_regs->flags and pt_regs->sp, where they belong.

As a result, we can drop stub_iopl() and thread_struct::usersp.

Usage of PER_CPU(old_rsp) is reduced to bare minimum.

FIXUP/RESTORE_TOP_OF_STACK macros are on diet too.

(This is a resend. Previous version was on top of KERNEL_STACK_OFFSET
removal patch. This one is on top of Andy's current git. Patch is run-tested.)

CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ingo Molnar <mingo@kernel.org>
CC: Borislav Petkov <bp@alien8.de>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Andy Lutomirski <luto@amacapital.net>
CC: Oleg Nesterov <oleg@redhat.com>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Alexei Starovoitov <ast@plumgrid.com>
CC: Will Drewry <wad@chromium.org>
CC: Kees Cook <keescook@chromium.org>
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org

Denys Vlasenko (2):
x86: save r11 into pt_regs->flags on SYSCALL64 fastpath
x86: save user %rsp in pt_regs->sp on SYSCALL64 fastpath

arch/x86/include/asm/calling.h | 20 +++++++++-----
arch/x86/include/asm/compat.h | 2 +-
arch/x86/include/asm/processor.h | 6 -----
arch/x86/include/asm/ptrace.h | 8 ++----
arch/x86/kernel/entry_64.S | 57 ++++++++++++++--------------------------
arch/x86/kernel/perf_regs.c | 2 +-
arch/x86/kernel/process_64.c | 8 +-----
arch/x86/syscalls/syscall_64.tbl | 2 +-
arch/x86/um/sys_call_table_64.c | 2 +-
9 files changed, 40 insertions(+), 67 deletions(-)

--
1.8.1.4



\
 
 \ /
  Last update: 2015-03-08 22:01    [W:0.035 / U:2.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site