Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723AbeAKCJW (ORCPT + 1 other); Wed, 10 Jan 2018 21:09:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753169AbeAKCJT (ORCPT ); Wed, 10 Jan 2018 21:09:19 -0500 Date: Wed, 10 Jan 2018 20:09:16 -0600 From: Josh Poimboeuf To: Andi Kleen Cc: tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, dwmw@amazon.co.uk, pjt@google.com, luto@kernel.org, peterz@infradead.org, thomas.lendacky@amd.com, tim.c.chen@linux.intel.com, gregkh@linux-foundation.org, dave.hansen@intel.com, jikos@kernel.org, Andi Kleen Subject: Re: [PATCH v1 1/8] x86/entry/clearregs: Remove partial stack frame in fast system call Message-ID: <20180111020916.2pionyjrik6pdwzb@treble> References: <20180110010328.22163-1-andi@firstfloor.org> <20180110010328.22163-2-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180110010328.22163-2-andi@firstfloor.org> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 11 Jan 2018 02:09:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 05:03:21PM -0800, Andi Kleen wrote: > From: Andi Kleen > > Remove the partial stack frame in the 64bit syscall fast path. > In the next patch we want to clear the extra registers, which requires > to always save all registers. So remove the partial stack frame > in the syscall fast path and always save everything. > > This actually simplifies the code because the ptregs stubs > are not needed anymore. > > arch/x86/entry/entry_64.S | 57 ++++----------------------------------------------------- > arch/x86/entry/syscall_64.c | 2 +- > > Signed-off-by: Andi Kleen > --- > arch/x86/entry/entry_64.S | 57 ++++----------------------------------------- > arch/x86/entry/syscall_64.c | 2 +- > 2 files changed, 5 insertions(+), 54 deletions(-) > > diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S > index 58dbf7a12a05..bbdfbdd817d6 100644 > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -234,7 +234,9 @@ GLOBAL(entry_SYSCALL_64_after_hwframe) > pushq %r9 /* pt_regs->r9 */ > pushq %r10 /* pt_regs->r10 */ > pushq %r11 /* pt_regs->r11 */ > - sub $(6*8), %rsp /* pt_regs->bp, bx, r12-15 not saved */ > + sub $(6*8), %rsp > + SAVE_EXTRA_REGS > + > UNWIND_HINT_REGS extra=0 Now that the extra regs are being saved, the "extra=0" can be removed from the unwind hint. -- Josh