[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFx=moDaKj3Ogc_Fvm0vKQ1DP=yA9UE3axmpECyv3Khi1Q@mail.gmail.com>
Date: Tue, 20 Feb 2018 14:25:03 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Dominik Brodowski <linux@...inikbrodowski.net>,
Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Brian Gerst <brgerst@...il.com>,
Andrew Lutomirski <luto@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Dan Williams <dan.j.williams@...el.com>
Subject: Re: [RFC PATCH v3 1/6] x86/entry/64: move PUSH_AND_CLEAR_REGS from
interrupt macro to helper function
On Tue, Feb 20, 2018 at 1:01 PM, Dominik Brodowski
<linux@...inikbrodowski.net> wrote:
> +ENTRY(interrupt_entry)
> + UNWIND_HINT_FUNC
> +
> + PUSH_AND_CLEAR_REGS save_ret=1
> + ENCODE_FRAME_POINTER 8
> +
> + ret
> +END(interrupt_entry)
There's nothing wrong with this patch, but it does expose what a nasty
hack our "ENCODE_FRAME_POINTER" thing is.
It generates (when there is an offset, like this):
leaq \ptregs_offset(%rsp), %rbp
orq $0x1, %rbp
and I would _really_ hope that the stack pointer is always aligned on
interrupt entry, so I don't see why it's not just
leaq 1+\ptregs_offset(%rsp), %rbp
instead.
I dunno. Let's ask Josh what the reason for the separate "or" was.
But this is an independent issue of this patch, really.
Linus
Powered by blists - more mailing lists