Re: [PATCH 07/16] x86/asm: Move SYSENTER_stack to the beginning of struct tss_struct

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 3:37 PM, Thomas Gleixner 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_s

Re: [PATCH 07/16] x86/asm: Move SYSENTER_stack to the beginning of struct tss_struct

2017-11-20 Thread Thomas Gleixner
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 calcu

[PATCH 07/16] x86/asm: Move SYSENTER_stack to the beginning of struct tss_struct

2017-11-20 Thread Andy Lutomirski
I want SYSENTER_stack to have reliable overflow detection, which means that it needs to be at the bottom of a page, not the top. Move it to the beginning of struct tss_struct and page-align it. Also add an assertion to make sure that the fixed hardware TSS doesn't cross a page boundary. Signed-of