From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751378AbbGBKx2 (ORCPT ); Thu, 2 Jul 2015 06:53:28 -0400 Received: from mail.skyhub.de ([78.46.96.112]:44898 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbbGBKxV (ORCPT ); Thu, 2 Jul 2015 06:53:21 -0400 Date: Thu, 2 Jul 2015 12:52:58 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, =?utf-8?B?RnLDqWTDqXJpYw==?= Weisbecker , Rik van Riel , Oleg Nesterov , Denys Vlasenko , Kees Cook , Brian Gerst , paulmck@linux.vnet.ibm.com Subject: Re: [PATCH v4 12/17] x86/asm/entry/64: Save all regs on interrupt entry Message-ID: <20150702105258.GG4001@pd.tnic> References: <1d672626fd72cb5fd5814f589d3147b1c15a1647.1435602481.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1d672626fd72cb5fd5814f589d3147b1c15a1647.1435602481.git.luto@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2015 at 12:33:44PM -0700, Andy Lutomirski wrote: > To prepare for the big rewrite of the error and interrupt exit > paths, we will need pt_regs completely filled in. It's already > completely filled in when error_exit runs, so rearrange interrupt > handling to match it. This will slow down interrupt handling very > slightly (eight instructions), but the simplification it enables > will be more than worth it. > > Signed-off-by: Andy Lutomirski > --- > arch/x86/entry/entry_64.S | 29 +++++++++-------------------- > 1 file changed, 9 insertions(+), 20 deletions(-) > > diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S > index 9bc76766aa71..51d34fafe4c0 100644 > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -502,21 +502,13 @@ END(irq_entries_start) > /* 0(%rsp): ~(interrupt number) */ > .macro interrupt func > cld > - /* > - * Since nothing in interrupt handling code touches r12...r15 members > - * of "struct pt_regs", and since interrupts can nest, we can save > - * four stack slots and simultaneously provide > - * an unwind-friendly stack layout by saving "truncated" pt_regs > - * exactly up to rbp slot, without these members. > - */ > - ALLOC_PT_GPREGS_ON_STACK -RBP > - SAVE_C_REGS -RBP > - /* this goes to 0(%rsp) for unwinder, not for saving the value: */ > - SAVE_EXTRA_REGS_RBP -RBP That macro's unused now AFAICT. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --