From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbdKVXam (ORCPT ); Wed, 22 Nov 2017 18:30:42 -0500 Received: from mga03.intel.com ([134.134.136.65]:51470 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbdKVXal (ORCPT ); Wed, 22 Nov 2017 18:30:41 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,438,1505804400"; d="scan'208";a="152271572" Subject: Re: [PATCH 09/30] x86, kaiser: only populate shadow page tables for userspace To: Andy Lutomirski References: <20171110193058.BECA7D88@viggo.jf.intel.com> <20171110193113.E35BC3BF@viggo.jf.intel.com> <7e458284-b334-bb70-a374-c65cc4ef9f02@linux.intel.com> Cc: Thomas Gleixner , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , moritz.lipp@iaik.tugraz.at, Daniel Gruss , michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, Linus Torvalds , Kees Cook , Hugh Dickins , X86 ML From: Dave Hansen Message-ID: Date: Wed, 22 Nov 2017 15:30:37 -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: 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/21/2017 07:44 PM, Andy Lutomirski wrote: >> So, I guess we could enforce that only PGDs with _PAGE_USER set can ever >> be cleared. That has a nice symmetry to it because we set the shadow >> when we see _PAGE_USER and we would then clear the shadow when we see >> _PAGE_USER. > Is this code path ever hit in any case other than tearing down an LDT? Do you mean the PGD clearing? We use it for tearing down userspace PGDs, but that's it.