[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrUbn1dykuKS+y6N6qvNh7MvzUUFeaqWFAxx3N2kKfF5sA@mail.gmail.com>
Date: Mon, 20 Nov 2017 17:25:33 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
Borislav Petkov <bpetkov@...e.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Brian Gerst <brgerst@...il.com>,
Dave Hansen <dave.hansen@...el.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH 07/16] x86/asm: Move SYSENTER_stack to the beginning of
struct tss_struct
On Mon, Nov 20, 2017 at 3:37 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Mon, 20 Nov 2017, Andy Lutomirski wrote:
>> struct tss_struct {
>> /*
>> - * The hardware state:
>> + * Space for the temporary SYSENTER stack. Used for the entry
>> + * trampoline as well. Size it such that tss_struct ends up
>> + * as a multiple of PAGE_SIZE. This calculation assumes that
>> + * io_bitmap is a multiple of PAGE_SIZE (8192 bytes) plus one
>> + * long.
>
> I don't see how sizeof(tss_struct) is a multiple of PAGE_SIZE
>
> canary = 8
> stack = 512
> hw_tss = 104
> io bitmap = 8200
> -------------------------
> 8824
>
> The alignment is what blows it up to 3 * PAGE_SIZE
Whoops! That *was* correct in the RFC version version, but I changed
it and failed to fix the comment.
Powered by blists - more mailing lists