From patchwork Tue Mar 21 07:17:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 9636107 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 02B046020B for ; Tue, 21 Mar 2017 07:17:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E74C427CEA for ; Tue, 21 Mar 2017 07:17:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D87C827CF9; Tue, 21 Mar 2017 07:17:43 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 0D08927CEA for ; Tue, 21 Mar 2017 07:17:42 +0000 (UTC) Received: (qmail 20137 invoked by uid 550); 21 Mar 2017 07:17:41 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 20113 invoked from network); 21 Mar 2017 07:17:40 -0000 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=Yh3X+zBZol2yPbSkCFoM7sUsX3aVW+MZRnj1XH2U+Jw=; b=VfQI3iSDy2NWaK4DvaBTOEzsIVuvoNxuMlK0t499BkhGLivH2zEkDnhSoKaNpDKmWv ZG5F9P2ZZz9qFPAy1VlDUTQcV++6/ERPORqx4SkuSCE+nOYBpVG2ZKiGv1wd/cD/376s GTgmtydac2CtEUOZJjuOw6Q33FjCYbXo4/6Wy/4azsSmEnks8XK4yCUM27XaVRyib9if rGbgIPScWkm7him4yH2zHVTseEGk3YQvOOqyCC6hcXTLV7K2mfNuSTgLbaalT/485ZRh Y2+PB4RvhEZn59Lgh0gFrLJCm0XUhIdZFQ87JGmxcC6GyCYFxY5Yu6d1o5GqwT0Xd1CV l8nQ== 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=Yh3X+zBZol2yPbSkCFoM7sUsX3aVW+MZRnj1XH2U+Jw=; b=qMZhkHlk2W3qPf53RsX0Lg259UGT5xUjiNtXh2l3EgAYKGlGFDANYrnYl20vfcLtDh s/1gfVsLivLCHVDjJGi9kJB8OrMXrWCl1o/doP/QSR2Lxqflxe2DdIqnCxmqLa5cx3Hj x4pIJ46ChX9UoFLEh0smtzDBnkS/cHrvEpu+OM8ivupGOBtOElvsm484fWs7z34UiHRe XwX3mbMsg2M5kjKEOG+TeUst3qHuKFV+eQrKHToIi+QrXzmUMKi40vQZA9MIXiid4Rnp 4LN8z0JzfexaBVxYZUdo81dUidYfE4+iebL+PGZvSVVb9eQQ6pE4S31zFh6GPyHcv/X4 MBjw== X-Gm-Message-State: AFeK/H0YVAQ1/ZBUnN00ddG9f2mOM1LQ3/r3eA1S3240MDgs6cIkHaWU0Q1al8mD7k6cjw== X-Received: by 10.223.129.183 with SMTP id 52mr31044423wra.88.1490080649227; Tue, 21 Mar 2017 00:17:29 -0700 (PDT) Sender: Ingo Molnar Date: Tue, 21 Mar 2017 08:17:25 +0100 From: Ingo Molnar To: Thomas Garnier Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Kees Cook , Andrew Morton , Dave Hansen , Borislav Petkov , Hugh Dickins , Xiao Guangrong , Matthew Wilcox , Boris Ostrovsky , Andy Lutomirski , Paul Gortmaker , Michal Hocko , zijun_hu , Chris Wilson , x86@kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, richard.weiyang@gmail.com Message-ID: <20170321071725.GA15782@gmail.com> References: <20170320194024.60749-1-thgarnie@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170320194024.60749-1-thgarnie@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: [kernel-hardening] Re: [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END X-Virus-Scanned: ClamAV using ClamSMTP * Thomas Garnier wrote: > This patch removes fixmap headers on non-x86 code introduced by the > adaptable MODULE_END change. It is also removed in the 32-bit pgtable > header. Instead, it is added by default in the pgtable generic header > for both architectures. > > Signed-off-by: Thomas Garnier > --- > arch/x86/include/asm/pgtable.h | 1 + > arch/x86/include/asm/pgtable_32.h | 1 - > arch/x86/kernel/module.c | 1 - > arch/x86/mm/dump_pagetables.c | 1 - > arch/x86/mm/kasan_init_64.c | 1 - > mm/vmalloc.c | 4 ---- > 6 files changed, 1 insertion(+), 8 deletions(-) So I already have v1 and there's no explanation about the changes from v1 to v2. The interdiff between v1 and v2 is below, it only affects x86, presumably it's done to simplify the header usage slightly: instead of including fixmap.h in both pgtable_32/64.h it's only included in the common pgtable.h file. That's a sensible cleanup of the original patch and I'd rather not rebase it (as tip:x86/mm has other changes as well), so could I've applied the delta cleanup on top of the existing changes, with its own changelog. Thanks, Ingo ============> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 84f6ec4d47ec..9f6809545269 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -601,6 +601,7 @@ pte_t *populate_extra_pte(unsigned long vaddr); #include #include #include +#include static inline int pte_none(pte_t pte) { diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h index fbc73360aea0..bfab55675c16 100644 --- a/arch/x86/include/asm/pgtable_32.h +++ b/arch/x86/include/asm/pgtable_32.h @@ -14,7 +14,6 @@ */ #ifndef __ASSEMBLY__ #include -#include #include #include diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 13709cf74ab6..1a4bc71534d4 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -13,7 +13,6 @@ #include #include #include -#include extern pud_t level3_kernel_pgt[512]; extern pud_t level3_ident_pgt[512];