From patchwork Thu Mar 16 08:10:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 9627579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EA7596048C for ; Thu, 16 Mar 2017 08:11:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBEBB28518 for ; Thu, 16 Mar 2017 08:11:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE9DB28647; Thu, 16 Mar 2017 08:11:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97D2D28518 for ; Thu, 16 Mar 2017 08:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbdCPIKY (ORCPT ); Thu, 16 Mar 2017 04:10:24 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35348 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbdCPIKU (ORCPT ); Thu, 16 Mar 2017 04:10:20 -0400 Received: by mail-wm0-f65.google.com with SMTP id z133so1472319wmb.2; Thu, 16 Mar 2017 01:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pjT9NJYRnvn+p6sSMnvU6JfBL4djxGzynJAhu2/KTOM=; b=EVFltWhViAHW4qgT+fItvsiuUTk6ORTkYRPedXb4rtDVTBVYzfJtcWejN45ZXl5OQ+ clSjqB4zm6Y0N2ojqRV94/jw92nZh/QcoA3+WCxoaHWKbt0XUBzq4yUUQ5vGY2+jvFMG sp5AHB0jXICENi0x9WeFeZ9NzN7lPjQi2K0gIOhcvSj0rryHLO2+gv3vC1o9boMj0xyv ZGS6XgHrg/0WdaMJKdNfutFVrkAc0oU/i6QzbTe8IfEVBT0frt5Dlq2ix7Y0W8VU68fn z/RlMwseyshZBjFPWN2Vt/zuvtn9YGZFiw6Au/yK8OUG3vR5Wb1BxkF6cjsgG7WOZ6KO foGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=pjT9NJYRnvn+p6sSMnvU6JfBL4djxGzynJAhu2/KTOM=; b=XoMC+Y2iAKDPH7U+cmpG2Wcd1OH1Tsf2LAQIbcZKoECoZVBxBNRmaPHcMbjKJ63+w1 /yeTg6T4jjXD8vpKvWJy8UaVG/XE2WeBrv7GMEs+30kEUQAQTjX5kE24k86qoZlIpuXQ KS/Czedi0ZnrH3YlvkgaEWO0acY2mGOUrhtcxjopvbaRAmTUPp2L+jrJ937voKsLzk3v K/iRuXIoav3qpK6tZYx8S2T03Ct6D5/jMOxAei5flepv99IZyO4lpdpagxG1LxEv8Rss pdRYYrfsD3iNt6jptSysr2D0FyPvmP1MOUYZiS5K81MH/EdH+W1S15cI2F1bOAjxky/x GCGQ== X-Gm-Message-State: AFeK/H1qBrEjCBeESXk4hkFKS9Qt9hWETPdTt2WFUmI3P8s1oYe0XuM3uXO1767ahw3COA== X-Received: by 10.28.168.150 with SMTP id r144mr8084421wme.43.1489651817772; Thu, 16 Mar 2017 01:10:17 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id w97sm5208120wrc.20.2017.03.16.01.10.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 01:10:16 -0700 (PDT) Date: Thu, 16 Mar 2017 09:10:13 +0100 From: Ingo Molnar To: Thomas Garnier Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Jonathan Corbet , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Lorenzo Stoakes , Kees Cook , Juergen Gross , Andy Lutomirski , Paul Gortmaker , Andrew Morton , Michal Hocko , zijun_hu , Chris Wilson , Andy Lutomirski , "Rafael J . Wysocki" , Len Brown , Pavel Machek , Jiri Kosina , Matt Fleming , Ard Biesheuvel , Boris Ostrovsky , Rusty Russell , Paolo Bonzini , Borislav Petkov , Christian Borntraeger , Frederic Weisbecker , "Luis R . Rodriguez" , Stanislaw Gruszka , Peter Zijlstra , Josh Poimboeuf , Vitaly Kuznetsov , Tim Chen , Joerg Roedel , Radim =?utf-8?B?S3LEjW3DocWZ?= , x86@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-pm@vger.kernel.org, linux-efi@vger.kernel.org, xen-devel@lists.xenproject.org, lguest@lists.ozlabs.org, kvm@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH v7 1/3] x86/mm: Adapt MODULES_END based on Fixmap section size Message-ID: <20170316081013.GB7815@gmail.com> References: <20170314170508.100882-1-thgarnie@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170314170508.100882-1-thgarnie@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * Thomas Garnier wrote: > This patch aligns MODULES_END to the beginning of the Fixmap section. > It optimizes the space available for both sections. The address is > pre-computed based on the number of pages required by the Fixmap > section. > > It will allow GDT remapping in the Fixmap section. The current > MODULES_END static address does not provide enough space for the kernel > to support a large number of processors. > > Signed-off-by: Thomas Garnier > --- > Based on next-20170308 > --- > Documentation/x86/x86_64/mm.txt | 5 ++++- > arch/x86/include/asm/pgtable_64_types.h | 3 ++- > arch/x86/kernel/module.c | 1 + > arch/x86/mm/dump_pagetables.c | 1 + > arch/x86/mm/kasan_init_64.c | 1 + > mm/vmalloc.c | 1 + > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -35,6 +35,7 @@ > #include > #include > #include > +#include > > #include "internal.h" Note that asm/fixmap.h is an x86-ism that isn't present in many other architectures, so this hunk will break the build. To make progress with these patches I've fixed it up with an ugly #ifdef CONFIG_X86, but it needs a real solution instead before this can be pushed upstream. Thanks, Ingo =====================> mm/vmalloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index dabea6a29fad..b7d2a23349f4 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -35,7 +35,10 @@ #include #include #include -#include + +#ifdef CONFIG_X86 +# include +#endif #include "internal.h"