[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWOdw8eQa3gCBwq4-v0_seFvnajpNYYCph_gai06M81vw@mail.gmail.com>
Date: Thu, 2 Jul 2015 08:33:28 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Borislav Petkov <bp@...en8.de>
Cc: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Frédéric Weisbecker <fweisbec@...il.com>,
Rik van Riel <riel@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Denys Vlasenko <vda.linux@...glemail.com>,
Kees Cook <keescook@...omium.org>,
Brian Gerst <brgerst@...il.com>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH v4 12/17] x86/asm/entry/64: Save all regs on interrupt entry
On Thu, Jul 2, 2015 at 3:52 AM, Borislav Petkov <bp@...en8.de> wrote:
> 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 <luto@...nel.org>
>> ---
>> 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.
>
I'll delete it in v5.
--Andy
> --
> Regards/Gruss,
> Boris.
>
> ECO tip #101: Trim your mails when you reply.
> --
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists