From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbdKWHYF (ORCPT ); Thu, 23 Nov 2017 02:24:05 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33904 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbdKWHYD (ORCPT ); Thu, 23 Nov 2017 02:24:03 -0500 X-Google-Smtp-Source: AGs4zMbVUn2C4l6qLXG1IFOGb+0LlCk80YSyfR9Jia23N3oSkjabMryb9gxbq+Y8kfJYCxh+v5KvyA== Date: Thu, 23 Nov 2017 08:23:59 +0100 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, moritz.lipp@iaik.tugraz.at, daniel.gruss@iaik.tugraz.at, michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, luto@kernel.org, torvalds@linux-foundation.org, keescook@google.com, hughd@google.com, x86@kernel.org, jgross@suse.com Subject: Re: [PATCH 00/23] [v4] KAISER: unmap most of the kernel from userspace page tables Message-ID: <20171123072359.kyjqwp63ja2gpeek@gmail.com> References: <20171123003438.48A0EEDE@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171123003438.48A0EEDE@viggo.jf.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > Thanks, everyone for all the reviews thus far. I hope I managed to > address all the feedback given so far, except for the TODOs of > course. This is a pretty minor update compared to v1->v2. > > These patches are all on this tip branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=WIP.x86/mm Note that on top of latest -tip the bzImage build fails with: arch/x86/boot/compressed/pagetable.o: In function `kernel_ident_mapping_init': pagetable.c:(.text+0x31b): undefined reference to `kaiser_enabled' arch/x86/boot/compressed/Makefile:109: recipe for target 'arch/x86/boot/compressed/vmlinux' failed that's I think because the early boot code shares some code via kernel_ident_mapping_init() et al, and that code grew a new KAISER runtime variable which isn't present in the special early-boot environment. I.e. something like the (totally untested) patch below should do the trick. Thanks, Ingo --- arch/x86/boot/compressed/pagetable.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: tip/arch/x86/boot/compressed/pagetable.c =================================================================== --- tip.orig/arch/x86/boot/compressed/pagetable.c +++ tip/arch/x86/boot/compressed/pagetable.c @@ -36,6 +36,12 @@ /* Used by pgtable.h asm code to force instruction serialization. */ unsigned long __force_order; +/* + * We share the kernel_ident_mapping_init(), but the early boot version does not need + * the Kaiser-logic: + */ +int kaiser_enabled = 0; + /* Used to track our page table allocation area. */ struct alloc_pgt_data { unsigned char *pgt_buf;