From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753555AbbCISkC (ORCPT ); Mon, 9 Mar 2015 14:40:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51270 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbbCISj5 (ORCPT ); Mon, 9 Mar 2015 14:39:57 -0400 From: Denys Vlasenko To: Andy Lutomirski Cc: Denys Vlasenko , Linus Torvalds , Steven Rostedt , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4 v2] x86: entry_64.S: steps towards simpler iret frame handling Date: Mon, 9 Mar 2015 19:39:20 +0100 Message-Id: <1425926364-9526-1-git-send-email-dvlasenk@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Changes since v1: on Ingo's request, split into 4 patches intead of 2. CC: Linus Torvalds CC: Steven Rostedt CC: Ingo Molnar CC: Borislav Petkov CC: "H. Peter Anvin" CC: Andy Lutomirski CC: Oleg Nesterov CC: Frederic Weisbecker CC: Alexei Starovoitov CC: Will Drewry CC: Kees Cook CC: x86@kernel.org CC: linux-kernel@vger.kernel.org Denys Vlasenko (4): x86: save r11 into pt_regs->flags on SYSCALL64 fastpath Remove stub_iopl x86: save user %rsp in pt_regs->sp on SYSCALL64 fastpath Remove unused stuff 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