public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END
@ 2017-03-20 19:40 Thomas Garnier
  2017-03-21  1:52 ` Wei Yang
  2017-03-21  7:17 ` Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Garnier @ 2017-03-20 19:40 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Andrey Ryabinin,
	Alexander Potapenko, Dmitry Vyukov, Thomas Garnier, 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
  Cc: x86, linux-kernel, kasan-dev, linux-mm, kernel-hardening,
	richard.weiyang

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 <thgarnie@google.com>
---
 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(-)

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 6f6f351e0a81..78d1fc32e947 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -598,6 +598,7 @@ pte_t *populate_extra_pte(unsigned long vaddr);
 #include <linux/mm_types.h>
 #include <linux/mmdebug.h>
 #include <linux/log2.h>
+#include <asm/fixmap.h>
 
 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 <asm/processor.h>
-#include <asm/fixmap.h>
 #include <linux/threads.h>
 #include <asm/paravirt.h>
 
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index fad61caac75e..477ae806c2fa 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -35,7 +35,6 @@
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
-#include <asm/fixmap.h>
 
 #if 0
 #define DEBUGP(fmt, ...)				\
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 75efeecc85eb..58b5bee7ea27 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -20,7 +20,6 @@
 
 #include <asm/kasan.h>
 #include <asm/pgtable.h>
-#include <asm/fixmap.h>
 
 /*
  * The dumper groups pagetable entries of the same type into one, and for
diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
index 1bde19ef86bd..8d63d7a104c3 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -9,7 +9,6 @@
 
 #include <asm/tlbflush.h>
 #include <asm/sections.h>
-#include <asm/fixmap.h>
 
 extern pgd_t early_level4_pgt[PTRS_PER_PGD];
 extern struct range pfn_mapped[E820_X_MAX];
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index b7d2a23349f4..0dd80222b20b 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -36,10 +36,6 @@
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
 
-#ifdef CONFIG_X86
-# include <asm/fixmap.h>
-#endif
-
 #include "internal.h"
 
 struct vfree_deferred {
-- 
2.12.0.367.g23dc2f6d3c-goog

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END
  2017-03-20 19:40 [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END Thomas Garnier
@ 2017-03-21  1:52 ` Wei Yang
  2017-03-21 16:00   ` Thomas Garnier
  2017-03-21  7:17 ` Ingo Molnar
  1 sibling, 1 reply; 6+ messages in thread
From: Wei Yang @ 2017-03-21  1:52 UTC (permalink / raw)
  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, linux-kernel,
	kasan-dev, linux-mm, kernel-hardening, richard.weiyang

[-- Attachment #1: Type: text/plain, Size: 3466 bytes --]

On Mon, Mar 20, 2017 at 12:40:24PM -0700, 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 <thgarnie@google.com>
>---
> 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(-)
>
>diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
>index 6f6f351e0a81..78d1fc32e947 100644
>--- a/arch/x86/include/asm/pgtable.h
>+++ b/arch/x86/include/asm/pgtable.h
>@@ -598,6 +598,7 @@ pte_t *populate_extra_pte(unsigned long vaddr);
> #include <linux/mm_types.h>
> #include <linux/mmdebug.h>
> #include <linux/log2.h>
>+#include <asm/fixmap.h>
> 
> 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 <asm/processor.h>
>-#include <asm/fixmap.h>
> #include <linux/threads.h>
> #include <asm/paravirt.h>
> 

Yep, I thinks the above two is what I mean.

>diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
>index fad61caac75e..477ae806c2fa 100644
>--- a/arch/x86/kernel/module.c
>+++ b/arch/x86/kernel/module.c
>@@ -35,7 +35,6 @@
> #include <asm/page.h>
> #include <asm/pgtable.h>
> #include <asm/setup.h>
>-#include <asm/fixmap.h>
> 

Hmm... your code is already merged in upstream?

When I look into current Torvalds tree, it looks not include the <asm/fixmap.h>

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/module.c

Which tree your change is based on? Do I miss something?

> #if 0
> #define DEBUGP(fmt, ...)				\
>diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
>index 75efeecc85eb..58b5bee7ea27 100644
>--- a/arch/x86/mm/dump_pagetables.c
>+++ b/arch/x86/mm/dump_pagetables.c
>@@ -20,7 +20,6 @@
> 
> #include <asm/kasan.h>
> #include <asm/pgtable.h>
>-#include <asm/fixmap.h>
> 

The same as this one.

> /*
>  * The dumper groups pagetable entries of the same type into one, and for
>diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
>index 1bde19ef86bd..8d63d7a104c3 100644
>--- a/arch/x86/mm/kasan_init_64.c
>+++ b/arch/x86/mm/kasan_init_64.c
>@@ -9,7 +9,6 @@
> 
> #include <asm/tlbflush.h>
> #include <asm/sections.h>
>-#include <asm/fixmap.h>
> 
> extern pgd_t early_level4_pgt[PTRS_PER_PGD];
> extern struct range pfn_mapped[E820_X_MAX];
>diff --git a/mm/vmalloc.c b/mm/vmalloc.c
>index b7d2a23349f4..0dd80222b20b 100644
>--- a/mm/vmalloc.c
>+++ b/mm/vmalloc.c
>@@ -36,10 +36,6 @@
> #include <asm/tlbflush.h>
> #include <asm/shmparam.h>
> 
>-#ifdef CONFIG_X86
>-# include <asm/fixmap.h>
>-#endif
>-
> #include "internal.h"
> 
> struct vfree_deferred {
>-- 
>2.12.0.367.g23dc2f6d3c-goog


At last, you have tested both on x86-32 and x86-64 platform?

-- 
Wei Yang
Help you, Help me

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END
  2017-03-20 19:40 [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END Thomas Garnier
  2017-03-21  1:52 ` Wei Yang
@ 2017-03-21  7:17 ` Ingo Molnar
  2017-03-21  7:24   ` [tip:x86/mm] x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h tip-bot for Thomas Garnier
  2017-03-21 16:01   ` [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END Thomas Garnier
  1 sibling, 2 replies; 6+ messages in thread
From: Ingo Molnar @ 2017-03-21  7:17 UTC (permalink / raw)
  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, linux-kernel,
	kasan-dev, linux-mm, kernel-hardening, richard.weiyang


* Thomas Garnier <thgarnie@google.com> 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 <thgarnie@google.com>
> ---
>  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 <linux/mm_types.h>
 #include <linux/mmdebug.h>
 #include <linux/log2.h>
+#include <asm/fixmap.h>
 
 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 <asm/processor.h>
-#include <asm/fixmap.h>
 #include <linux/threads.h>
 #include <asm/paravirt.h>
 
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 <asm/processor.h>
 #include <linux/bitops.h>
 #include <linux/threads.h>
-#include <asm/fixmap.h>
 
 extern pud_t level3_kernel_pgt[512];
 extern pud_t level3_ident_pgt[512];

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [tip:x86/mm] x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h
  2017-03-21  7:17 ` Ingo Molnar
@ 2017-03-21  7:24   ` tip-bot for Thomas Garnier
  2017-03-21 16:01   ` [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END Thomas Garnier
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Thomas Garnier @ 2017-03-21  7:24 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: keescook, linux-kernel, bp, glider, thgarnie, aryabinin,
	dave.hansen, akpm, torvalds, hughd, zijun_hu, mhocko, willy, luto,
	paul.gortmaker, hpa, boris.ostrovsky, peterz, mingo, tglx,
	dvyukov, chris, guangrong.xiao

Commit-ID:  ef37bc361442545a5be3c56c49a08c3153032127
Gitweb:     http://git.kernel.org/tip/ef37bc361442545a5be3c56c49a08c3153032127
Author:     Thomas Garnier <thgarnie@google.com>
AuthorDate: Tue, 21 Mar 2017 08:17:25 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 21 Mar 2017 08:21:17 +0100

x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h

Instead of including fixmap.h twice in pgtable_32.h and pgtable_64.h,
include it only once, in the common asm/pgtable.h header.

Signed-off-by: Thomas Garnier <thgarnie@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Cc: kasan-dev@googlegroups.com
Cc: kernel-hardening@lists.openwall.com
Cc: linux-mm@kvack.org
Cc: richard.weiyang@gmail.com
Cc: zijun_hu <zijun_hu@htc.com>
Link: http://lkml.kernel.org/r/20170321071725.GA15782@gmail.com
[ Generated this patch from two other patches and wrote changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/pgtable.h    | 1 +
 arch/x86/include/asm/pgtable_32.h | 1 -
 arch/x86/include/asm/pgtable_64.h | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 160256b..18a6f54 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -603,6 +603,7 @@ pte_t *populate_extra_pte(unsigned long vaddr);
 #include <linux/mm_types.h>
 #include <linux/mmdebug.h>
 #include <linux/log2.h>
+#include <asm/fixmap.h>
 
 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 fbc7336..bfab5567 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -14,7 +14,6 @@
  */
 #ifndef __ASSEMBLY__
 #include <asm/processor.h>
-#include <asm/fixmap.h>
 #include <linux/threads.h>
 #include <asm/paravirt.h>
 
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 13709cf..1a4bc71 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -13,7 +13,6 @@
 #include <asm/processor.h>
 #include <linux/bitops.h>
 #include <linux/threads.h>
-#include <asm/fixmap.h>
 
 extern pud_t level3_kernel_pgt[512];
 extern pud_t level3_ident_pgt[512];

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END
  2017-03-21  1:52 ` Wei Yang
@ 2017-03-21 16:00   ` Thomas Garnier
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Garnier @ 2017-03-21 16:00 UTC (permalink / raw)
  To: Wei Yang
  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, the arch/x86 maintainers,
	LKML, kasan-dev, Linux-MM, Kernel Hardening

On Mon, Mar 20, 2017 at 6:52 PM, Wei Yang <richard.weiyang@gmail.com> wrote:
> On Mon, Mar 20, 2017 at 12:40:24PM -0700, 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 <thgarnie@google.com>
>>---
>> 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(-)
>>
>>diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
>>index 6f6f351e0a81..78d1fc32e947 100644
>>--- a/arch/x86/include/asm/pgtable.h
>>+++ b/arch/x86/include/asm/pgtable.h
>>@@ -598,6 +598,7 @@ pte_t *populate_extra_pte(unsigned long vaddr);
>> #include <linux/mm_types.h>
>> #include <linux/mmdebug.h>
>> #include <linux/log2.h>
>>+#include <asm/fixmap.h>
>>
>> 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 <asm/processor.h>
>>-#include <asm/fixmap.h>
>> #include <linux/threads.h>
>> #include <asm/paravirt.h>
>>
>
> Yep, I thinks the above two is what I mean.
>
>>diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
>>index fad61caac75e..477ae806c2fa 100644
>>--- a/arch/x86/kernel/module.c
>>+++ b/arch/x86/kernel/module.c
>>@@ -35,7 +35,6 @@
>> #include <asm/page.h>
>> #include <asm/pgtable.h>
>> #include <asm/setup.h>
>>-#include <asm/fixmap.h>
>>
>
> Hmm... your code is already merged in upstream?

It was merged on tip x86, it was my point before (as Ingo says after too).

>
> When I look into current Torvalds tree, it looks not include the <asm/fixmap.h>
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/module.c
>
> Which tree your change is based on? Do I miss something?

tip mm x86, before the first patch.

>
>> #if 0
>> #define DEBUGP(fmt, ...)                              \
>>diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
>>index 75efeecc85eb..58b5bee7ea27 100644
>>--- a/arch/x86/mm/dump_pagetables.c
>>+++ b/arch/x86/mm/dump_pagetables.c
>>@@ -20,7 +20,6 @@
>>
>> #include <asm/kasan.h>
>> #include <asm/pgtable.h>
>>-#include <asm/fixmap.h>
>>
>
> The same as this one.
>
>> /*
>>  * The dumper groups pagetable entries of the same type into one, and for
>>diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
>>index 1bde19ef86bd..8d63d7a104c3 100644
>>--- a/arch/x86/mm/kasan_init_64.c
>>+++ b/arch/x86/mm/kasan_init_64.c
>>@@ -9,7 +9,6 @@
>>
>> #include <asm/tlbflush.h>
>> #include <asm/sections.h>
>>-#include <asm/fixmap.h>
>>
>> extern pgd_t early_level4_pgt[PTRS_PER_PGD];
>> extern struct range pfn_mapped[E820_X_MAX];
>>diff --git a/mm/vmalloc.c b/mm/vmalloc.c
>>index b7d2a23349f4..0dd80222b20b 100644
>>--- a/mm/vmalloc.c
>>+++ b/mm/vmalloc.c
>>@@ -36,10 +36,6 @@
>> #include <asm/tlbflush.h>
>> #include <asm/shmparam.h>
>>
>>-#ifdef CONFIG_X86
>>-# include <asm/fixmap.h>
>>-#endif
>>-
>> #include "internal.h"
>>
>> struct vfree_deferred {
>>--
>>2.12.0.367.g23dc2f6d3c-goog
>
>
> At last, you have tested both on x86-32 and x86-64 platform?

I did, I know have a collected set of configs for both 32-bit and
64-bit and a script merging each config and building. It should reduce
the risk of exotic configurations not working.

>
> --
> Wei Yang
> Help you, Help me



-- 
Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END
  2017-03-21  7:17 ` Ingo Molnar
  2017-03-21  7:24   ` [tip:x86/mm] x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h tip-bot for Thomas Garnier
@ 2017-03-21 16:01   ` Thomas Garnier
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Garnier @ 2017-03-21 16:01 UTC (permalink / raw)
  To: Ingo Molnar
  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, the arch/x86 maintainers,
	LKML, kasan-dev, Linux-MM, Kernel Hardening, Wei Yang

On Tue, Mar 21, 2017 at 12:17 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Thomas Garnier <thgarnie@google.com> 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 <thgarnie@google.com>
>> ---
>>  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.
>

Correct, simplify the header and explains better.

> 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.

I understand. Thanks for merging a clean-up version of this patch.

>
> 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 <linux/mm_types.h>
>  #include <linux/mmdebug.h>
>  #include <linux/log2.h>
> +#include <asm/fixmap.h>
>
>  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 <asm/processor.h>
> -#include <asm/fixmap.h>
>  #include <linux/threads.h>
>  #include <asm/paravirt.h>
>
> 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 <asm/processor.h>
>  #include <linux/bitops.h>
>  #include <linux/threads.h>
> -#include <asm/fixmap.h>
>
>  extern pud_t level3_kernel_pgt[512];
>  extern pud_t level3_ident_pgt[512];
>



-- 
Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-21 16:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 19:40 [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END Thomas Garnier
2017-03-21  1:52 ` Wei Yang
2017-03-21 16:00   ` Thomas Garnier
2017-03-21  7:17 ` Ingo Molnar
2017-03-21  7:24   ` [tip:x86/mm] x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h tip-bot for Thomas Garnier
2017-03-21 16:01   ` [PATCH tip v2] x86/mm: Correct fixmap header usage on adaptable MODULES_END Thomas Garnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox