Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbdLBKrT (ORCPT ); Sat, 2 Dec 2017 05:47:19 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:54293 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdLBKrS (ORCPT ); Sat, 2 Dec 2017 05:47:18 -0500 Date: Sat, 2 Dec 2017 11:47:15 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds , Josh Poimboeuf Subject: Re: [PATCH 1/2] Undo the split of setup_cpu_entry_area In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 25 On Sat, 2 Dec 2017, Thomas Gleixner wrote: > On Fri, 1 Dec 2017, Andy Lutomirski wrote: > > > This is obviously a hack. Either the patch should be adjusted back to > > the version I sent or trap_init should forcibly initialize all PMDs > > by something like __set_fixmap(..., __mkpte(0)); or however it's spelled. > > I split it because the whole thing crashed when I kept the loop you had > because it tried to allocate stuff. Had no time to figure out why, so I > went the lazy way of making it "work". [ 0.000000] dump_stack+0x85/0xc5 [ 0.000000] warn_alloc+0x114/0x1c0 [ 0.000000] __alloc_pages_slowpath+0x1089/0x10d0 [ 0.000000] __alloc_pages_nodemask+0x2e8/0x370 [ 0.000000] __get_free_pages+0x10/0x40 [ 0.000000] kpti_shadow_pagetable_walk+0x2b2/0x3e0 [ 0.000000] kpti_add_user_map+0xfe/0x330 [ 0.000000] kpti_add_mapping_cpu_entry+0x5a/0x100 [ 0.000000] trap_init+0x2c/0x7b [ 0.000000] start_kernel+0x24c/0x497 [ 0.000000] secondary_startup_64+0xa5/0xb0 Cute, isn't it? And then further down the line it triplefaults of course.