From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752865AbbI3B2o (ORCPT ); Tue, 29 Sep 2015 21:28:44 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:55260 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbbI3B2l (ORCPT ); Tue, 29 Sep 2015 21:28:41 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Andy Lutomirski , 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 , "H. Peter Anvin" 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> Date: Tue, 29 Sep 2015 20:20:19 -0500 In-Reply-To: (Linus Torvalds's message of "Tue, 29 Sep 2015 13:50:56 -0400") Message-ID: <878u7ou2i4.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1/+Sw76BbSRZKP9QpdONr9PLkMWk+klbfA= X-SA-Exim-Connect-IP: 67.3.201.231 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 511 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 3.5 (0.7%), b_tie_ro: 2.6 (0.5%), parse: 0.56 (0.1%), extract_message_metadata: 18 (3.5%), get_uri_detail_list: 1.62 (0.3%), tests_pri_-1000: 6 (1.2%), tests_pri_-950: 0.95 (0.2%), tests_pri_-900: 0.79 (0.2%), tests_pri_-400: 23 (4.5%), check_bayes: 22 (4.2%), b_tokenize: 5 (1.1%), b_tok_get_all: 7 (1.5%), b_comp_prob: 1.59 (0.3%), b_tok_touch_all: 3.7 (0.7%), b_finish: 0.61 (0.1%), tests_pri_0: 451 (88.1%), tests_pri_500: 6 (1.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] x86: Use entire page for the per-cpu GDT only if paravirt-enabled X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > 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. I tested this by accident once when workinng on what has become known as coreboot. Early in boot with your GDT in a EEPROM switching from real mode to 32bit protected mode causes a write and locks up the machine when the hardware declines the write to the GDT to set the accessed bit. As I recall the write kept being retried and retried and retried... Setting the access bit in the GDT cleared up the problem and I did not look back. Way up in 64bit mode something might be different, but I don't know why cpu designeres would waste the silicon. Eric