From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932110AbeADQeP (ORCPT + 1 other); Thu, 4 Jan 2018 11:34:15 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:42799 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752704AbeADQeN (ORCPT ); Thu, 4 Jan 2018 11:34:13 -0500 Date: Thu, 4 Jan 2018 17:34:09 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: Benjamin Gilbert , Greg Kroah-Hartman , X86 ML , LKML , linux-mm@kvack.org, stable , Ingo Molnar , Dave Hansen , Peter Zijlstra , Thomas Garnier , Alexander Kuleshov Subject: Re: "bad pmd" errors + oops with KPTI on 4.14.11 after loading X.509 certs In-Reply-To: Message-ID: References: <20180103084600.GA31648@trogon.sfo.coreos.systems> <20180103092016.GA23772@kroah.com> <20180104003303.GA1654@trogon.sfo.coreos.systems> 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 Return-Path: On Thu, 4 Jan 2018, Andy Lutomirski wrote: > On Thu, Jan 4, 2018 at 4:28 AM, Thomas Gleixner wrote: > > --- a/arch/x86/include/asm/pgtable_64_types.h > > +++ b/arch/x86/include/asm/pgtable_64_types.h > > @@ -88,7 +88,7 @@ typedef struct { pteval_t pte; } pte_t; > > # define VMALLOC_SIZE_TB _AC(32, UL) > > # define __VMALLOC_BASE _AC(0xffffc90000000000, UL) > > # define __VMEMMAP_BASE _AC(0xffffea0000000000, UL) > > -# define LDT_PGD_ENTRY _AC(-4, UL) > > +# define LDT_PGD_ENTRY _AC(-3, UL) > > # define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT) > > #endif > > If you actually change the memory map order, you need to change the > shadow copy in mm/dump_pagetables.c, too. I have a draft patch to > just sort the damn list, but that's not ready yet. Yes, I forgot that in the first attempt. Noticed myself when dumping it, but that should be irrelevant to figure out whether it fixes the problem at hand. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 4 Jan 2018 17:34:09 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: Benjamin Gilbert , Greg Kroah-Hartman , X86 ML , LKML , linux-mm@kvack.org, stable , Ingo Molnar , Dave Hansen , Peter Zijlstra , Thomas Garnier , Alexander Kuleshov Subject: Re: "bad pmd" errors + oops with KPTI on 4.14.11 after loading X.509 certs In-Reply-To: Message-ID: References: <20180103084600.GA31648@trogon.sfo.coreos.systems> <20180103092016.GA23772@kroah.com> <20180104003303.GA1654@trogon.sfo.coreos.systems> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: On Thu, 4 Jan 2018, Andy Lutomirski wrote: > On Thu, Jan 4, 2018 at 4:28 AM, Thomas Gleixner wrote: > > --- a/arch/x86/include/asm/pgtable_64_types.h > > +++ b/arch/x86/include/asm/pgtable_64_types.h > > @@ -88,7 +88,7 @@ typedef struct { pteval_t pte; } pte_t; > > # define VMALLOC_SIZE_TB _AC(32, UL) > > # define __VMALLOC_BASE _AC(0xffffc90000000000, UL) > > # define __VMEMMAP_BASE _AC(0xffffea0000000000, UL) > > -# define LDT_PGD_ENTRY _AC(-4, UL) > > +# define LDT_PGD_ENTRY _AC(-3, UL) > > # define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT) > > #endif > > If you actually change the memory map order, you need to change the > shadow copy in mm/dump_pagetables.c, too. I have a draft patch to > just sort the damn list, but that's not ready yet. Yes, I forgot that in the first attempt. Noticed myself when dumping it, but that should be irrelevant to figure out whether it fixes the problem at hand. -- 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