From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] x86: Use entire page for the per-cpu GDT only if paravirt-enabled Date: Tue, 29 Sep 2015 13:30:52 -0700 Message-ID: <560AF4FC.3000306@zytor.com> References: <1443290440-14930-1-git-send-email-dvlasenk@redhat.com> <706E9982-24E3-442B-808A-172909449DD4@zytor.com> <56070241.2030407@redhat.com> <20150928075851.GA23998@gmail.com> <56093657.8070409@redhat.com> <20150929090112.GA1400@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Ingo Molnar , Thomas Gleixner , Paolo Bonzini , Denys Vlasenko , Borislav Petkov , Andrew Morton , David Vrabel , Konrad Rzeszutek Wilk , Brian Gerst , Boris Ostrovsky , Gleb Natapov , Kees Cook , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Joerg Roedel , X86 ML , kvm list To: Andy Lutomirski , Linus Torvalds Return-path: Received: from terminus.zytor.com ([198.137.202.10]:46533 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbbI2Ubo (ORCPT ); Tue, 29 Sep 2015 16:31:44 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/29/2015 11:02 AM, Andy Lutomirski wrote: > On Tue, Sep 29, 2015 at 10:50 AM, Linus Torvalds > wrote: >> On Tue, Sep 29, 2015 at 1:35 PM, Andy Lutomirski wrote: >>> >>> Does anyone know what happens if you stick a non-accessed segment in >>> the GDT, map the GDT RO, and access it? >> >> You should get a #PF, as you guess, but go ahead and test it if you >> want to make sure. > > Then I think that, if we do this, the patch series should first make > it percpu and fixmapped but RW and then flip it RO as a separate patch > in case we need to revert the actual RO bit. I don't want to break > Wine or The Witcher 2 because of this, and we might need various > fixups. I really hope that no one uses get_thread_area to check > whether TLS has been accessed. > Of course. -hpa