From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933175AbdKBLVN (ORCPT ); Thu, 2 Nov 2017 07:21:13 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53663 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752352AbdKBLVM (ORCPT ); Thu, 2 Nov 2017 07:21:12 -0400 Date: Thu, 2 Nov 2017 12:21:10 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: Dave Hansen , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , moritz.lipp@iaik.tugraz.at, Daniel Gruss , michael.schwarz@iaik.tugraz.at, Linus Torvalds , Kees Cook , Hugh Dickins , X86 ML Subject: Re: [PATCH 02/23] x86, kaiser: do not set _PAGE_USER for init_mm page tables In-Reply-To: Message-ID: References: <20171031223146.6B47C861@viggo.jf.intel.com> <20171031223150.AB41C68F@viggo.jf.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017, Andy Lutomirski wrote: > On Wed, Nov 1, 2017 at 2:28 PM, Thomas Gleixner wrote: > > On Wed, 1 Nov 2017, Andy Lutomirski wrote: > > > >> On Wed, Nov 1, 2017 at 2:11 PM, Thomas Gleixner wrote: > >> > On Tue, 31 Oct 2017, Dave Hansen wrote: > >> > > >> >> > >> >> init_mm is for kernel-exclusive use. If someone is allocating page > >> >> tables in it, do not set _PAGE_USER on them. This ensures that > >> >> we do *not* set NX on these page tables in the KAISER code. > >> > > >> > This changelog is confusing at best. > >> > > >> > Why is this a kaiser issue? Nothing should ever create _PAGE_USER entries > >> > in init_mm, right? > >> > >> The vsyscall page is _PAGE_USER and lives in init_mm via the fixmap. > > > > Groan, forgot about that abomination, but still there is no point in having > > it marked PAGE_USER in the init_mm at all, kaiser or not. > > > > How can it be PAGE_USER in user mms but not init_mm? It's the same page table. Right you are. Brain was already shutdown it seems. Thanks, tglx