From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id 29D1044043C for ; Wed, 8 Nov 2017 15:11:04 -0500 (EST) Received: by mail-pg0-f69.google.com with SMTP id o7so3578675pgc.23 for ; Wed, 08 Nov 2017 12:11:04 -0800 (PST) Received: from mga03.intel.com (mga03.intel.com. [134.134.136.65]) by mx.google.com with ESMTPS id u3si80371pfl.4.2017.11.08.12.11.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 12:11:03 -0800 (PST) Subject: Re: [PATCH 01/30] x86, mm: do not set _PAGE_USER for init_mm page tables References: <20171108194646.907A1942@viggo.jf.intel.com> <20171108194647.ABC9BC79@viggo.jf.intel.com> From: Dave Hansen Message-ID: Date: Wed, 8 Nov 2017 12:11:01 -0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Linux Kernel Mailing List , linux-mm , Thomas Gleixner , moritz.lipp@iaik.tugraz.at, Daniel Gruss , michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, Andrew Lutomirski , Kees Cook , Hugh Dickins , the arch/x86 maintainers On 11/08/2017 11:52 AM, Linus Torvalds wrote: > On Wed, Nov 8, 2017 at 11:46 AM, Dave Hansen > wrote: >> >> + >> static inline void pmd_populate_kernel(struct mm_struct *mm, >> pmd_t *pmd, pte_t *pte) >> { >> + pteval_t pgtable_flags = mm_pgtable_flags(mm); > > Why is "pmd_populate_kernel()" using mm_pgtable_flags(mm)? > > It should just use _KERNPG_TABLE unconditionally, shouldn't it? > Nothing to do with init_mm, it's populating a _kernel_ page table > regardless, no? The end result is probably the same since a quick grep shows it only ever getting called with init_mm or NULL. But, yeah, it should probably just be _PAGE_KERNEL directly. I'll update it. -- 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