From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756570AbdLTTu3 (ORCPT ); Wed, 20 Dec 2017 14:50:29 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:51908 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755929AbdLTTu2 (ORCPT ); Wed, 20 Dec 2017 14:50:28 -0500 Date: Wed, 20 Dec 2017 20:50:11 +0100 (CET) From: Thomas Gleixner To: Juergen Gross cc: Ingo Molnar , Peter Zijlstra , Dave Hansen , LKML , x86@kernel.org, Linus Torvalds , Andy Lutomirsky , Borislav Petkov , Greg KH , keescook@google.com, hughd@google.com, Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , daniel.gruss@iaik.tugraz.at, Dave Hansen , Borislav Petkov , "H. Peter Anvin" Subject: Re: [patch V163 27/51] x86/mm/pti: Populate user PGD In-Reply-To: Message-ID: References: <20171218114215.239543034@linutronix.de> <20171218115255.827361623@linutronix.de> <93e88e2c-50fc-49a6-7113-d9b64cf70fbd@intel.com> <20171218204105.bs74dkixlbwfegb5@hirez.programming.kicks-ass.net> <20171218205732.ql7ejvd743hceotf@hirez.programming.kicks-ass.net> <20171219074835.3yc56k3z7adzlf6a@gmail.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 Wed, 20 Dec 2017, Juergen Gross wrote: > On 20/12/17 01:22, Thomas Gleixner wrote: > > On Tue, 19 Dec 2017, Thomas Gleixner wrote: > >> On Tue, 19 Dec 2017, Ingo Molnar wrote: > >> We don't run out of space, but the 0-day robot triggered a nasty issue. > >> > >> The fixmap bottom address, which contains the early_ioremap fixmap area, is: > >> > >> vaddr_bt = FIXADDR_TOP - FIX_BTMAP_BEGIN * PAGE_SIZE > >> > >> If that address is lower than: > >> > >> vaddr_end = __START_KERNEL_map + KERNEL_IMAGE_SIZE; > >> > >> then cleanup_highmap() will happily 0 out the PMD entry for the PTE page of > >> FIX_BTMAP. That entry was set up earlier in early_ioremap_init(). > >> > >> As a consequence the first call to __early_set_fixmap() which tries to > >> install a PTE for early_ioremap() will crash and burn. > >> > >> Below is a nasty hack which fixes the problem. Ideally we get all of this > >> cpu_entry_stuff out of the fixmap. I'll look into that later, but for now > >> the patch 'fixes' the issue. > > > > I had a stab on moving the cpu_entry_area to some other place. > > > > The patch below works, but: > > > > - it breaks i386 build because I have not yet found a way to place the > > CPU_ENTRY_AREA_BASE without creating include recursion hell > > > > - it probably does not work on XEN_PV, but I'm too tired now to figure > > that out. > > The attached patch lets the system come up as XEN_PV. I folded it back to the proper place. Thanks for looking! tglx