From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id 470D26B0005 for ; Tue, 6 Mar 2018 08:46:00 -0500 (EST) Received: by mail-pl0-f71.google.com with SMTP id 62-v6so9860655ply.4 for ; Tue, 06 Mar 2018 05:46:00 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com. [192.55.52.93]) by mx.google.com with ESMTPS id e89si12013320pfm.198.2018.03.06.05.45.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 05:45:58 -0800 (PST) Subject: Re: [PATCH 07/34] x86/entry/32: Restore segments before int registers References: <1520245563-8444-1-git-send-email-joro@8bytes.org> <1520245563-8444-8-git-send-email-joro@8bytes.org> <20180305131231.GR16484@8bytes.org> <20180305213550.GV16484@8bytes.org> <12c11262-5e0f-2987-0a74-3bde4b66c352@zytor.com> <20180306070437.kf3fkevqj6cuxptz@gmail.com> From: Dave Hansen Message-ID: <6224cf9e-4c13-58e5-4541-c06074a20191@intel.com> Date: Tue, 6 Mar 2018 05:45:56 -0800 MIME-Version: 1.0 In-Reply-To: <20180306070437.kf3fkevqj6cuxptz@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar , "H. Peter Anvin" Cc: Linus Torvalds , Joerg Roedel , Brian Gerst , Thomas Gleixner , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andrew Lutomirski , Josh Poimboeuf , =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , David Laight , Denys Vlasenko , Eduardo Valentin , Greg Kroah-Hartman , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , Joerg Roedel On 03/05/2018 11:04 PM, Ingo Molnar wrote: > * H. Peter Anvin wrote: >> On NX-enabled hardware NX works with PDE, but the PDPDT in general doesn't >> have permission bits (it's really more of a set of four CR3s than a page >> table level.) > The 4 PDPDT entries are also shadowed in the CPU and are only refreshed > on CR3 loads, not spontaneously reloaded from memory during TLB walk > like regular page table entries, right? Yes. The SDM even calls them non-architectural "PDPTE Registers" and talks about them only being loaded at CR3 write time. ~5 years ago we even had a bug directly related to this feature: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=324cdc3f7e6a752fe0e95fa7b5c9664171a34ded -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org