From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754651AbdKMTWz (ORCPT ); Mon, 13 Nov 2017 14:22:55 -0500 Received: from mga05.intel.com ([192.55.52.43]:50275 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754627AbdKMTWr (ORCPT ); Mon, 13 Nov 2017 14:22:47 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,389,1505804400"; d="scan'208";a="173071434" Subject: Re: [RFC 6/7] x86/asm: Remap the TSS into the cpu entry area To: Andy Lutomirski , X86 ML References: <5b424fefa9230917995d0584b40bc539a9bd9224.1510371795.git.luto@kernel.org> Cc: Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Linus Torvalds From: Dave Hansen Message-ID: <3e2bdf66-cbd4-4e78-ead1-e5c99d2a6d08@intel.com> Date: Mon, 13 Nov 2017 11:22:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <5b424fefa9230917995d0584b40bc539a9bd9224.1510371795.git.luto@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/2017 08:05 PM, Andy Lutomirski wrote: > diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h > index fbc9b7f4e35e..8a9ba5553cab 100644 > --- a/arch/x86/include/asm/fixmap.h > +++ b/arch/x86/include/asm/fixmap.h > @@ -52,6 +52,13 @@ extern unsigned long __FIXADDR_TOP; > struct cpu_entry_area > { > char gdt[PAGE_SIZE]; > + > + /* > + * The gdt is just below cpu_tss and thus serves (on x86_64) as a > + * a read-only guard page for the SYSENTER stack at the bottom > + * of the TSS region. > + */ > + struct tss_struct tss; > }; > Aha, and here's the place that you need sizeof(tss_struct) to be nice and page-aligned. But why don't we just do: char tss_space[PAGE_SIZE*something]; ?