* [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-16 21:54 Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-16 21:54 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Jonathan Corbet,
Thomas Garnier, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen, Luis R . Rodriguez, Stanislaw Gruszka,
Arnd Bergmann
Cc: linux-efi, kvm, linux-pm, x86, linux-doc, linux-kernel, lguest,
kernel-hardening, xen-devel
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 <thgarnie@google.com>
---
Based on next-20170213
---
Documentation/x86/x86_64/mm.txt | 5 ++++-
arch/x86/include/asm/pgtable_64_types.h | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
--
2.11.0.483.g087da7b7c-goog
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-17 16:00 ` Thomas Garnier
(?)
@ 2017-02-17 20:52 ` Thomas Garnier
-1 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 20:52 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen, Luis R . Rodriguez, Stanislaw Gruszka,
Arnd Bergmann, Peter Zijlstra, Dave Hansen, Vitaly Kuznetsov,
Paul Gortmaker, Josh Poimboeuf, Tim Chen, Andi Kleen, Jiri Olsa,
Michael Ellerman, Joerg Roedel, Paolo Bonzini,
Radim Krčmář,
Andy Lutomirski, the arch/x86 maintainers, LKML, linux-doc,
Linux PM list, linux-efi, xen-devel, lguest, kvm list,
Kernel Hardening
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 <thgarnie@google.com>
---
Based on next-20170213
Fixed fixmap dependencies on random configurations.
---
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 +
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp
fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be
raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h
b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 477ae806c2fa..fad61caac75e 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -35,6 +35,7 @@
#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 8aa6bea1cd6c..90170415f08a 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -19,6 +19,7 @@
#include <linux/seq_file.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 0493c17b8a51..34f167cf3316 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -8,6 +8,7 @@
#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 011b446f8758..84e637f2fa49 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -35,6 +35,7 @@
#include <linux/uaccess.h>
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
+#include <asm/fixmap.h>
#include "internal.h"
--
2.11.0.483.g087da7b7c-goog
On Fri, Feb 17, 2017 at 8:00 AM, Thomas Garnier <thgarnie@google.com> wrote:
> I will send an update patch on this thread to fix the fixmap dependencies.
>
> On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
>>
>> Hi Thomas,
>>
>> [auto build test ERROR on next-20170216]
>> [also build test ERROR on v4.10-rc8]
>> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
>> v4.9-rc7 v4.9-rc6]
>> [if your patch is applied to the wrong git tree, please drop us a note to
>> help improve the system]
>>
>> url:
>> https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
>> config: x86_64-randconfig-s4-02170325 (attached as .config)
>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>> reproduce:
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
>> from arch/x86/include/asm/paravirt_types.h:44,
>> from arch/x86/include/asm/ptrace.h:71,
>> from arch/x86/include/asm/math_emu.h:4,
>> from arch/x86/include/asm/processor.h:11,
>> from arch/x86/include/asm/cpufeature.h:4,
>> from arch/x86/include/asm/thread_info.h:52,
>> from include/linux/thread_info.h:25,
>> from arch/x86/include/asm/preempt.h:6,
>> from include/linux/preempt.h:59,
>> from include/linux/spinlock.h:50,
>> from include/linux/wait.h:8,
>> from include/linux/fs.h:5,
>> from include/linux/debugfs.h:18,
>> from arch/x86/mm/dump_pagetables.c:15:
>> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
>> >> declaration of function '__fix_to_virt'
>> >> [-Werror=implicit-function-declaration]
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
>> '__end_of_fixed_addresses' undeclared here (not in a function)
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> cc1: some warnings being treated as errors
>>
>> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>>
>> 65 #define VMALLOC_START __VMALLOC_BASE
>> 66 #define VMEMMAP_START __VMEMMAP_BASE
>> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
>> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
>> 40) - 1, UL))
>> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
>> 70 /* The module sections ends with the start of the fixmap */
>> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
>> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
>> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology
>> Center
>> https://lists.01.org/pipermail/kbuild-all Intel
>> Corporation
>
>
>
>
> --
> Thomas
--
Thomas
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 20:52 ` Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 20:52 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen
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 <thgarnie@google.com>
---
Based on next-20170213
Fixed fixmap dependencies on random configurations.
---
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 +
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp
fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be
raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h
b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 477ae806c2fa..fad61caac75e 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -35,6 +35,7 @@
#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 8aa6bea1cd6c..90170415f08a 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -19,6 +19,7 @@
#include <linux/seq_file.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 0493c17b8a51..34f167cf3316 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -8,6 +8,7 @@
#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 011b446f8758..84e637f2fa49 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -35,6 +35,7 @@
#include <linux/uaccess.h>
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
+#include <asm/fixmap.h>
#include "internal.h"
--
2.11.0.483.g087da7b7c-goog
On Fri, Feb 17, 2017 at 8:00 AM, Thomas Garnier <thgarnie@google.com> wrote:
> I will send an update patch on this thread to fix the fixmap dependencies.
>
> On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
>>
>> Hi Thomas,
>>
>> [auto build test ERROR on next-20170216]
>> [also build test ERROR on v4.10-rc8]
>> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
>> v4.9-rc7 v4.9-rc6]
>> [if your patch is applied to the wrong git tree, please drop us a note to
>> help improve the system]
>>
>> url:
>> https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
>> config: x86_64-randconfig-s4-02170325 (attached as .config)
>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>> reproduce:
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
>> from arch/x86/include/asm/paravirt_types.h:44,
>> from arch/x86/include/asm/ptrace.h:71,
>> from arch/x86/include/asm/math_emu.h:4,
>> from arch/x86/include/asm/processor.h:11,
>> from arch/x86/include/asm/cpufeature.h:4,
>> from arch/x86/include/asm/thread_info.h:52,
>> from include/linux/thread_info.h:25,
>> from arch/x86/include/asm/preempt.h:6,
>> from include/linux/preempt.h:59,
>> from include/linux/spinlock.h:50,
>> from include/linux/wait.h:8,
>> from include/linux/fs.h:5,
>> from include/linux/debugfs.h:18,
>> from arch/x86/mm/dump_pagetables.c:15:
>> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
>> >> declaration of function '__fix_to_virt'
>> >> [-Werror=implicit-function-declaration]
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
>> '__end_of_fixed_addresses' undeclared here (not in a function)
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> cc1: some warnings being treated as errors
>>
>> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>>
>> 65 #define VMALLOC_START __VMALLOC_BASE
>> 66 #define VMEMMAP_START __VMEMMAP_BASE
>> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
>> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
>> 40) - 1, UL))
>> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
>> 70 /* The module sections ends with the start of the fixmap */
>> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
>> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
>> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology
>> Center
>> https://lists.01.org/pipermail/kbuild-all Intel
>> Corporation
>
>
>
>
> --
> Thomas
--
Thomas
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 20:52 ` Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 20:52 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen
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 <thgarnie@google.com>
---
Based on next-20170213
Fixed fixmap dependencies on random configurations.
---
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 +
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp
fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be
raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h
b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 477ae806c2fa..fad61caac75e 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -35,6 +35,7 @@
#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 8aa6bea1cd6c..90170415f08a 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -19,6 +19,7 @@
#include <linux/seq_file.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 0493c17b8a51..34f167cf3316 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -8,6 +8,7 @@
#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 011b446f8758..84e637f2fa49 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -35,6 +35,7 @@
#include <linux/uaccess.h>
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
+#include <asm/fixmap.h>
#include "internal.h"
--
2.11.0.483.g087da7b7c-goog
On Fri, Feb 17, 2017 at 8:00 AM, Thomas Garnier <thgarnie@google.com> wrote:
> I will send an update patch on this thread to fix the fixmap dependencies.
>
> On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
>>
>> Hi Thomas,
>>
>> [auto build test ERROR on next-20170216]
>> [also build test ERROR on v4.10-rc8]
>> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
>> v4.9-rc7 v4.9-rc6]
>> [if your patch is applied to the wrong git tree, please drop us a note to
>> help improve the system]
>>
>> url:
>> https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
>> config: x86_64-randconfig-s4-02170325 (attached as .config)
>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>> reproduce:
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
>> from arch/x86/include/asm/paravirt_types.h:44,
>> from arch/x86/include/asm/ptrace.h:71,
>> from arch/x86/include/asm/math_emu.h:4,
>> from arch/x86/include/asm/processor.h:11,
>> from arch/x86/include/asm/cpufeature.h:4,
>> from arch/x86/include/asm/thread_info.h:52,
>> from include/linux/thread_info.h:25,
>> from arch/x86/include/asm/preempt.h:6,
>> from include/linux/preempt.h:59,
>> from include/linux/spinlock.h:50,
>> from include/linux/wait.h:8,
>> from include/linux/fs.h:5,
>> from include/linux/debugfs.h:18,
>> from arch/x86/mm/dump_pagetables.c:15:
>> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
>> >> declaration of function '__fix_to_virt'
>> >> [-Werror=implicit-function-declaration]
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
>> '__end_of_fixed_addresses' undeclared here (not in a function)
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> cc1: some warnings being treated as errors
>>
>> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>>
>> 65 #define VMALLOC_START __VMALLOC_BASE
>> 66 #define VMEMMAP_START __VMEMMAP_BASE
>> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
>> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
>> 40) - 1, UL))
>> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
>> 70 /* The module sections ends with the start of the fixmap */
>> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
>> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
>> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology
>> Center
>> https://lists.01.org/pipermail/kbuild-all Intel
>> Corporation
>
>
>
>
> --
> Thomas
--
Thomas
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-17 16:00 ` Thomas Garnier
(?)
(?)
@ 2017-02-17 20:52 ` Thomas Garnier
-1 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 20:52 UTC (permalink / raw)
To: kbuild test robot
Cc: linux-efi, Stanislaw Gruszka, linux-doc, kvm list,
Radim Krčmář,
Matt Fleming, Dave Hansen, Pavel Machek, H . Peter Anvin,
Kernel Hardening, Jiri Olsa, Boris Ostrovsky, Andi Kleen,
Jonathan Corbet, Michael Ellerman, Joerg Roedel,
the arch/x86 maintainers, Paul Gortmaker, Christian Borntraeger,
Ingo Molnar, xen-devel, Borislav Petkov, Len Brown, Jiri Kosina
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 <thgarnie@google.com>
---
Based on next-20170213
Fixed fixmap dependencies on random configurations.
---
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 +
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp
fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be
raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h
b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 477ae806c2fa..fad61caac75e 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -35,6 +35,7 @@
#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 8aa6bea1cd6c..90170415f08a 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -19,6 +19,7 @@
#include <linux/seq_file.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 0493c17b8a51..34f167cf3316 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -8,6 +8,7 @@
#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 011b446f8758..84e637f2fa49 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -35,6 +35,7 @@
#include <linux/uaccess.h>
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
+#include <asm/fixmap.h>
#include "internal.h"
--
2.11.0.483.g087da7b7c-goog
On Fri, Feb 17, 2017 at 8:00 AM, Thomas Garnier <thgarnie@google.com> wrote:
> I will send an update patch on this thread to fix the fixmap dependencies.
>
> On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
>>
>> Hi Thomas,
>>
>> [auto build test ERROR on next-20170216]
>> [also build test ERROR on v4.10-rc8]
>> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
>> v4.9-rc7 v4.9-rc6]
>> [if your patch is applied to the wrong git tree, please drop us a note to
>> help improve the system]
>>
>> url:
>> https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
>> config: x86_64-randconfig-s4-02170325 (attached as .config)
>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>> reproduce:
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
>> from arch/x86/include/asm/paravirt_types.h:44,
>> from arch/x86/include/asm/ptrace.h:71,
>> from arch/x86/include/asm/math_emu.h:4,
>> from arch/x86/include/asm/processor.h:11,
>> from arch/x86/include/asm/cpufeature.h:4,
>> from arch/x86/include/asm/thread_info.h:52,
>> from include/linux/thread_info.h:25,
>> from arch/x86/include/asm/preempt.h:6,
>> from include/linux/preempt.h:59,
>> from include/linux/spinlock.h:50,
>> from include/linux/wait.h:8,
>> from include/linux/fs.h:5,
>> from include/linux/debugfs.h:18,
>> from arch/x86/mm/dump_pagetables.c:15:
>> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
>> >> declaration of function '__fix_to_virt'
>> >> [-Werror=implicit-function-declaration]
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
>> '__end_of_fixed_addresses' undeclared here (not in a function)
>> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> ^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
>> 'MODULES_END'
>> { MODULES_END, "End Modules" },
>> ^~~~~~~~~~~
>> cc1: some warnings being treated as errors
>>
>> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>>
>> 65 #define VMALLOC_START __VMALLOC_BASE
>> 66 #define VMEMMAP_START __VMEMMAP_BASE
>> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
>> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
>> 40) - 1, UL))
>> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
>> 70 /* The module sections ends with the start of the fixmap */
>> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
>> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
>> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
>> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology
>> Center
>> https://lists.01.org/pipermail/kbuild-all Intel
>> Corporation
>
>
>
>
> --
> Thomas
--
Thomas
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-17 0:45 ` kbuild test robot
@ 2017-02-17 16:00 ` Thomas Garnier
-1 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 16:00 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen, Luis R . Rodriguez, Stanislaw Gruszka,
Arnd Bergmann
[-- Attachment #1: Type: text/plain, Size: 3488 bytes --]
I will send an update patch on this thread to fix the fixmap dependencies.
On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
> Hi Thomas,
>
> [auto build test ERROR on next-20170216]
> [also build test ERROR on v4.10-rc8]
> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
> v4.9-rc7 v4.9-rc6]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/
> x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
> config: x86_64-randconfig-s4-02170325 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
> from arch/x86/include/asm/paravirt_types.h:44,
> from arch/x86/include/asm/ptrace.h:71,
> from arch/x86/include/asm/math_emu.h:4,
> from arch/x86/include/asm/processor.h:11,
> from arch/x86/include/asm/cpufeature.h:4,
> from arch/x86/include/asm/thread_info.h:52,
> from include/linux/thread_info.h:25,
> from arch/x86/include/asm/preempt.h:6,
> from include/linux/preempt.h:59,
> from include/linux/spinlock.h:50,
> from include/linux/wait.h:8,
> from include/linux/fs.h:5,
> from include/linux/debugfs.h:18,
> from arch/x86/mm/dump_pagetables.c:15:
> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
> declaration of function '__fix_to_virt' [-Werror=implicit-function-
> declaration]
> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> ^
> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
> 'MODULES_END'
> { MODULES_END, "End Modules" },
> ^~~~~~~~~~~
> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
> '__end_of_fixed_addresses' undeclared here (not in a function)
> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> ^
> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
> 'MODULES_END'
> { MODULES_END, "End Modules" },
> ^~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>
> 65 #define VMALLOC_START __VMALLOC_BASE
> 66 #define VMEMMAP_START __VMEMMAP_BASE
> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
> 40) - 1, UL))
> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
> 70 /* The module sections ends with the start of the fixmap */
> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all Intel
> Corporation
>
--
Thomas
[-- Attachment #2: Type: text/html, Size: 4966 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 16:00 ` Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 16:00 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen, Luis R . Rodriguez, Stanislaw Gruszka,
Arnd Bergmann, Peter
[-- Attachment #1: Type: text/plain, Size: 3488 bytes --]
I will send an update patch on this thread to fix the fixmap dependencies.
On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
> Hi Thomas,
>
> [auto build test ERROR on next-20170216]
> [also build test ERROR on v4.10-rc8]
> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
> v4.9-rc7 v4.9-rc6]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/
> x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
> config: x86_64-randconfig-s4-02170325 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
> from arch/x86/include/asm/paravirt_types.h:44,
> from arch/x86/include/asm/ptrace.h:71,
> from arch/x86/include/asm/math_emu.h:4,
> from arch/x86/include/asm/processor.h:11,
> from arch/x86/include/asm/cpufeature.h:4,
> from arch/x86/include/asm/thread_info.h:52,
> from include/linux/thread_info.h:25,
> from arch/x86/include/asm/preempt.h:6,
> from include/linux/preempt.h:59,
> from include/linux/spinlock.h:50,
> from include/linux/wait.h:8,
> from include/linux/fs.h:5,
> from include/linux/debugfs.h:18,
> from arch/x86/mm/dump_pagetables.c:15:
> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
> declaration of function '__fix_to_virt' [-Werror=implicit-function-
> declaration]
> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> ^
> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
> 'MODULES_END'
> { MODULES_END, "End Modules" },
> ^~~~~~~~~~~
> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
> '__end_of_fixed_addresses' undeclared here (not in a function)
> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> ^
> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
> 'MODULES_END'
> { MODULES_END, "End Modules" },
> ^~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>
> 65 #define VMALLOC_START __VMALLOC_BASE
> 66 #define VMEMMAP_START __VMEMMAP_BASE
> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
> 40) - 1, UL))
> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
> 70 /* The module sections ends with the start of the fixmap */
> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all Intel
> Corporation
>
--
Thomas
[-- Attachment #2: Type: text/html, Size: 4966 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-17 0:45 ` kbuild test robot
(?)
(?)
@ 2017-02-17 16:00 ` Thomas Garnier
-1 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-17 16:00 UTC (permalink / raw)
To: kbuild test robot
Cc: linux-efi, Stanislaw Gruszka, linux-doc, kvm list,
Radim Krčmář,
Matt Fleming, Dave Hansen, Pavel Machek, H . Peter Anvin,
Kernel Hardening, Jiri Olsa, Boris Ostrovsky, Andi Kleen,
Jonathan Corbet, Michael Ellerman, Joerg Roedel,
the arch/x86 maintainers, Paul Gortmaker, Christian Borntraeger,
Ingo Molnar, xen-devel, Borislav Petkov, Len Brown, Jiri Kosina
[-- Attachment #1.1: Type: text/plain, Size: 3488 bytes --]
I will send an update patch on this thread to fix the fixmap dependencies.
On Thu, Feb 16, 2017 at 4:45 PM, kbuild test robot <lkp@intel.com> wrote:
> Hi Thomas,
>
> [auto build test ERROR on next-20170216]
> [also build test ERROR on v4.10-rc8]
> [cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8
> v4.9-rc7 v4.9-rc6]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/
> x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
> config: x86_64-randconfig-s4-02170325 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/x86/include/asm/pgtable_types.h:240:0,
> from arch/x86/include/asm/paravirt_types.h:44,
> from arch/x86/include/asm/ptrace.h:71,
> from arch/x86/include/asm/math_emu.h:4,
> from arch/x86/include/asm/processor.h:11,
> from arch/x86/include/asm/cpufeature.h:4,
> from arch/x86/include/asm/thread_info.h:52,
> from include/linux/thread_info.h:25,
> from arch/x86/include/asm/preempt.h:6,
> from include/linux/preempt.h:59,
> from include/linux/spinlock.h:50,
> from include/linux/wait.h:8,
> from include/linux/fs.h:5,
> from include/linux/debugfs.h:18,
> from arch/x86/mm/dump_pagetables.c:15:
> >> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit
> declaration of function '__fix_to_virt' [-Werror=implicit-function-
> declaration]
> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> ^
> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
> 'MODULES_END'
> { MODULES_END, "End Modules" },
> ^~~~~~~~~~~
> arch/x86/include/asm/pgtable_64_types.h:71:37: error:
> '__end_of_fixed_addresses' undeclared here (not in a function)
> #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> ^
> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro
> 'MODULES_END'
> { MODULES_END, "End Modules" },
> ^~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
>
> 65 #define VMALLOC_START __VMALLOC_BASE
> 66 #define VMEMMAP_START __VMEMMAP_BASE
> 67 #endif /* CONFIG_RANDOMIZE_MEMORY */
> 68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB <<
> 40) - 1, UL))
> 69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
> 70 /* The module sections ends with the start of the fixmap */
> > 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
> 72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
> 73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
> 74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all Intel
> Corporation
>
--
Thomas
[-- Attachment #1.2: Type: text/html, Size: 4966 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-16 21:54 ` Thomas Garnier
(?)
@ 2017-02-17 0:45 ` kbuild test robot
-1 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:45 UTC (permalink / raw)
To: Thomas Garnier
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Thomas Garnier, Kees Cook, Lorenzo Stoakes,
Juergen Gross, Andy Lutomirski, Rafael J . Wysocki, Len Brown,
Pavel Machek, Jiri Kosina, Matt Fleming, Ard Biesheuvel,
Boris Ostrovsky, Rusty Russell, Borislav Petkov,
Christian Borntraeger, Brian Gerst, He Chen, Luis R . Rodriguez,
Stanislaw Gruszka, Arnd Bergmann, Peter Zijlstra, Dave Hansen,
Vitaly Kuznetsov, Paul Gortmaker, Josh Poimboeuf, Tim Chen,
Andi Kleen, Jiri Olsa, Michael Ellerman, Joerg Roedel,
Paolo Bonzini, Radim Krčmář,
Andy Lutomirski, x86, linux-kernel, linux-doc, linux-pm,
linux-efi, xen-devel, lguest, kvm, kernel-hardening
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-s4-02170325 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
65 #define VMALLOC_START __VMALLOC_BASE
66 #define VMEMMAP_START __VMEMMAP_BASE
67 #endif /* CONFIG_RANDOMIZE_MEMORY */
68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
70 /* The module sections ends with the start of the fixmap */
> 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28755 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 0:45 ` kbuild test robot
0 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:45 UTC (permalink / raw)
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Thomas Garnier, Kees Cook, Lorenzo Stoakes,
Juergen Gross, Andy Lutomirski, Rafael J . Wysocki, Len Brown,
Pavel Machek, Jiri Kosina, Matt Fleming, Ard Biesheuvel,
Boris Ostrovsky, Rusty Russell, Borislav Petkov,
Christian Borntraeger, Brian Gerst
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-s4-02170325 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
65 #define VMALLOC_START __VMALLOC_BASE
66 #define VMEMMAP_START __VMEMMAP_BASE
67 #endif /* CONFIG_RANDOMIZE_MEMORY */
68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
70 /* The module sections ends with the start of the fixmap */
> 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28755 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 0:45 ` kbuild test robot
0 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:45 UTC (permalink / raw)
To: Thomas Garnier
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Thomas Garnier, Kees Cook, Lorenzo Stoakes,
Juergen Gross, Andy Lutomirski, Rafael J . Wysocki, Len Brown,
Pavel Machek, Jiri Kosina, Matt Fleming, Ard Biesheuvel,
Boris Ostrovsky, Rusty Russell, Borislav Petkov,
Christian Borntraeger, Brian Gerst
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-s4-02170325 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
65 #define VMALLOC_START __VMALLOC_BASE
66 #define VMEMMAP_START __VMEMMAP_BASE
67 #endif /* CONFIG_RANDOMIZE_MEMORY */
68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
70 /* The module sections ends with the start of the fixmap */
> 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28755 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-16 21:54 ` Thomas Garnier
` (3 preceding siblings ...)
(?)
@ 2017-02-17 0:45 ` kbuild test robot
-1 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:45 UTC (permalink / raw)
To: Thomas Garnier
Cc: linux-efi, Stanislaw Gruszka, linux-doc, kvm,
Radim Krčmář,
Matt Fleming, Dave Hansen, Pavel Machek, H . Peter Anvin,
kernel-hardening, Jiri Olsa, Thomas Gleixner, Andi Kleen,
Jonathan Corbet, Michael Ellerman, Joerg Roedel, x86,
Paul Gortmaker, Christian Borntraeger, Ingo Molnar, xen-devel,
Borislav Petkov, Len Brown, Jiri Kosina, Kees Cook,
Arnd Bergmann
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-s4-02170325 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:23: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__fix_to_virt +71 arch/x86/include/asm/pgtable_64_types.h
65 #define VMALLOC_START __VMALLOC_BASE
66 #define VMEMMAP_START __VMEMMAP_BASE
67 #endif /* CONFIG_RANDOMIZE_MEMORY */
68 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
69 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
70 /* The module sections ends with the start of the fixmap */
> 71 #define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
72 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
73 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
74 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28755 bytes --]
[-- Attachment #3: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-16 21:54 ` Thomas Garnier
(?)
@ 2017-02-17 0:37 ` kbuild test robot
-1 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:37 UTC (permalink / raw)
To: Thomas Garnier
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Thomas Garnier, Kees Cook, Lorenzo Stoakes,
Juergen Gross, Andy Lutomirski, Rafael J . Wysocki, Len Brown,
Pavel Machek, Jiri Kosina, Matt Fleming, Ard Biesheuvel,
Boris Ostrovsky, Rusty Russell, Borislav Petkov,
Christian Borntraeger, Brian Gerst, He Chen, Luis R . Rodriguez,
Stanislaw Gruszka, Arnd Bergmann, Peter Zijlstra, Dave Hansen,
Vitaly Kuznetsov, Paul Gortmaker, Josh Poimboeuf, Tim Chen,
Andi Kleen, Jiri Olsa, Michael Ellerman, Joerg Roedel,
Paolo Bonzini, Radim Krčmář,
Andy Lutomirski, x86, linux-kernel, linux-doc, linux-pm,
linux-efi, xen-devel, lguest, kvm, kernel-hardening
[-- Attachment #1: Type: text/plain, Size: 8138 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-h0-02170640 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
>> arch/x86/mm/dump_pagetables.c:87:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
{ MODULES_END, "End Modules" },
^
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^
cc1: some warnings being treated as errors
vim +/__fix_to_virt +87 arch/x86/mm/dump_pagetables.c
926e5392b Arjan van de Ven 2008-04-17 9 * This program is free software; you can redistribute it and/or
926e5392b Arjan van de Ven 2008-04-17 10 * modify it under the terms of the GNU General Public License
926e5392b Arjan van de Ven 2008-04-17 11 * as published by the Free Software Foundation; version 2
926e5392b Arjan van de Ven 2008-04-17 12 * of the License.
926e5392b Arjan van de Ven 2008-04-17 13 */
926e5392b Arjan van de Ven 2008-04-17 14
fe770bf03 H. Peter Anvin 2008-04-17 @15 #include <linux/debugfs.h>
fe770bf03 H. Peter Anvin 2008-04-17 16 #include <linux/mm.h>
84e629b66 Paul Gortmaker 2016-07-13 17 #include <linux/init.h>
146fbb766 Andrey Ryabinin 2017-02-10 18 #include <linux/sched.h>
926e5392b Arjan van de Ven 2008-04-17 19 #include <linux/seq_file.h>
926e5392b Arjan van de Ven 2008-04-17 20
926e5392b Arjan van de Ven 2008-04-17 21 #include <asm/pgtable.h>
926e5392b Arjan van de Ven 2008-04-17 22
926e5392b Arjan van de Ven 2008-04-17 23 /*
926e5392b Arjan van de Ven 2008-04-17 24 * The dumper groups pagetable entries of the same type into one, and for
926e5392b Arjan van de Ven 2008-04-17 25 * that it needs to keep some state when walking, and flush this state
926e5392b Arjan van de Ven 2008-04-17 26 * when a "break" in the continuity is found.
926e5392b Arjan van de Ven 2008-04-17 27 */
926e5392b Arjan van de Ven 2008-04-17 28 struct pg_state {
926e5392b Arjan van de Ven 2008-04-17 29 int level;
926e5392b Arjan van de Ven 2008-04-17 30 pgprot_t current_prot;
926e5392b Arjan van de Ven 2008-04-17 31 unsigned long start_address;
926e5392b Arjan van de Ven 2008-04-17 32 unsigned long current_address;
fe770bf03 H. Peter Anvin 2008-04-17 33 const struct addr_marker *marker;
3891a04aa H. Peter Anvin 2014-04-29 34 unsigned long lines;
ef6bea6dd Borislav Petkov 2014-01-18 35 bool to_dmesg;
e1a58320a Stephen Smalley 2015-10-05 36 bool check_wx;
e1a58320a Stephen Smalley 2015-10-05 37 unsigned long wx_pages;
926e5392b Arjan van de Ven 2008-04-17 38 };
926e5392b Arjan van de Ven 2008-04-17 39
fe770bf03 H. Peter Anvin 2008-04-17 40 struct addr_marker {
fe770bf03 H. Peter Anvin 2008-04-17 41 unsigned long start_address;
fe770bf03 H. Peter Anvin 2008-04-17 42 const char *name;
3891a04aa H. Peter Anvin 2014-04-29 43 unsigned long max_lines;
fe770bf03 H. Peter Anvin 2008-04-17 44 };
926e5392b Arjan van de Ven 2008-04-17 45
92851e2fc Andres Salomon 2010-07-20 46 /* indices for address_markers; keep sync'd w/ address_markers below */
92851e2fc Andres Salomon 2010-07-20 47 enum address_markers_idx {
92851e2fc Andres Salomon 2010-07-20 48 USER_SPACE_NR = 0,
92851e2fc Andres Salomon 2010-07-20 49 #ifdef CONFIG_X86_64
92851e2fc Andres Salomon 2010-07-20 50 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 51 LOW_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 52 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 53 VMEMMAP_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 54 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 55 ESPFIX_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 56 # endif
92851e2fc Andres Salomon 2010-07-20 57 HIGH_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 58 MODULES_VADDR_NR,
92851e2fc Andres Salomon 2010-07-20 59 MODULES_END_NR,
92851e2fc Andres Salomon 2010-07-20 60 #else
92851e2fc Andres Salomon 2010-07-20 61 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 62 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 63 VMALLOC_END_NR,
92851e2fc Andres Salomon 2010-07-20 64 # ifdef CONFIG_HIGHMEM
92851e2fc Andres Salomon 2010-07-20 65 PKMAP_BASE_NR,
92851e2fc Andres Salomon 2010-07-20 66 # endif
92851e2fc Andres Salomon 2010-07-20 67 FIXADDR_START_NR,
92851e2fc Andres Salomon 2010-07-20 68 #endif
92851e2fc Andres Salomon 2010-07-20 69 };
92851e2fc Andres Salomon 2010-07-20 70
fe770bf03 H. Peter Anvin 2008-04-17 71 /* Address space markers hints */
fe770bf03 H. Peter Anvin 2008-04-17 72 static struct addr_marker address_markers[] = {
fe770bf03 H. Peter Anvin 2008-04-17 73 { 0, "User Space" },
fe770bf03 H. Peter Anvin 2008-04-17 74 #ifdef CONFIG_X86_64
fe770bf03 H. Peter Anvin 2008-04-17 75 { 0x8000000000000000UL, "Kernel Space" },
0483e1fa6 Thomas Garnier 2016-06-21 76 { 0/* PAGE_OFFSET */, "Low Kernel Mapping" },
0483e1fa6 Thomas Garnier 2016-06-21 77 { 0/* VMALLOC_START */, "vmalloc() Area" },
0483e1fa6 Thomas Garnier 2016-06-21 78 { 0/* VMEMMAP_START */, "Vmemmap" },
8a5a5d153 Mathias Krause 2014-09-07 79 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 80 { ESPFIX_BASE_ADDR, "ESPfix Area", 16 },
8a5a5d153 Mathias Krause 2014-09-07 81 # endif
8266e31ed Mathias Krause 2014-09-21 82 # ifdef CONFIG_EFI
8266e31ed Mathias Krause 2014-09-21 83 { EFI_VA_END, "EFI Runtime Services" },
8266e31ed Mathias Krause 2014-09-21 84 # endif
fe770bf03 H. Peter Anvin 2008-04-17 85 { __START_KERNEL_map, "High Kernel Mapping" },
9a79cf9c1 Yinghai Lu 2008-03-07 86 { MODULES_VADDR, "Modules" },
9a79cf9c1 Yinghai Lu 2008-03-07 @87 { MODULES_END, "End Modules" },
fe770bf03 H. Peter Anvin 2008-04-17 88 #else
fe770bf03 H. Peter Anvin 2008-04-17 89 { PAGE_OFFSET, "Kernel Mapping" },
fe770bf03 H. Peter Anvin 2008-04-17 90 { 0/* VMALLOC_START */, "vmalloc() Area" },
:::::: The code at line 87 was first introduced by commit
:::::: 9a79cf9c1aa671325fa5ba37576c2cee23823d04 x86: sort address_markers for dump_pagetables
:::::: TO: Yinghai Lu <yhlu.kernel@gmail.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25184 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 0:37 ` kbuild test robot
0 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:37 UTC (permalink / raw)
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Thomas Garnier, Kees Cook, Lorenzo Stoakes,
Juergen Gross, Andy Lutomirski, Rafael J . Wysocki, Len Brown,
Pavel Machek, Jiri Kosina, Matt Fleming, Ard Biesheuvel,
Boris Ostrovsky, Rusty Russell, Borislav Petkov,
Christian Borntraeger, Brian Gerst
[-- Attachment #1: Type: text/plain, Size: 8138 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-h0-02170640 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
>> arch/x86/mm/dump_pagetables.c:87:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
{ MODULES_END, "End Modules" },
^
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^
cc1: some warnings being treated as errors
vim +/__fix_to_virt +87 arch/x86/mm/dump_pagetables.c
926e5392b Arjan van de Ven 2008-04-17 9 * This program is free software; you can redistribute it and/or
926e5392b Arjan van de Ven 2008-04-17 10 * modify it under the terms of the GNU General Public License
926e5392b Arjan van de Ven 2008-04-17 11 * as published by the Free Software Foundation; version 2
926e5392b Arjan van de Ven 2008-04-17 12 * of the License.
926e5392b Arjan van de Ven 2008-04-17 13 */
926e5392b Arjan van de Ven 2008-04-17 14
fe770bf03 H. Peter Anvin 2008-04-17 @15 #include <linux/debugfs.h>
fe770bf03 H. Peter Anvin 2008-04-17 16 #include <linux/mm.h>
84e629b66 Paul Gortmaker 2016-07-13 17 #include <linux/init.h>
146fbb766 Andrey Ryabinin 2017-02-10 18 #include <linux/sched.h>
926e5392b Arjan van de Ven 2008-04-17 19 #include <linux/seq_file.h>
926e5392b Arjan van de Ven 2008-04-17 20
926e5392b Arjan van de Ven 2008-04-17 21 #include <asm/pgtable.h>
926e5392b Arjan van de Ven 2008-04-17 22
926e5392b Arjan van de Ven 2008-04-17 23 /*
926e5392b Arjan van de Ven 2008-04-17 24 * The dumper groups pagetable entries of the same type into one, and for
926e5392b Arjan van de Ven 2008-04-17 25 * that it needs to keep some state when walking, and flush this state
926e5392b Arjan van de Ven 2008-04-17 26 * when a "break" in the continuity is found.
926e5392b Arjan van de Ven 2008-04-17 27 */
926e5392b Arjan van de Ven 2008-04-17 28 struct pg_state {
926e5392b Arjan van de Ven 2008-04-17 29 int level;
926e5392b Arjan van de Ven 2008-04-17 30 pgprot_t current_prot;
926e5392b Arjan van de Ven 2008-04-17 31 unsigned long start_address;
926e5392b Arjan van de Ven 2008-04-17 32 unsigned long current_address;
fe770bf03 H. Peter Anvin 2008-04-17 33 const struct addr_marker *marker;
3891a04aa H. Peter Anvin 2014-04-29 34 unsigned long lines;
ef6bea6dd Borislav Petkov 2014-01-18 35 bool to_dmesg;
e1a58320a Stephen Smalley 2015-10-05 36 bool check_wx;
e1a58320a Stephen Smalley 2015-10-05 37 unsigned long wx_pages;
926e5392b Arjan van de Ven 2008-04-17 38 };
926e5392b Arjan van de Ven 2008-04-17 39
fe770bf03 H. Peter Anvin 2008-04-17 40 struct addr_marker {
fe770bf03 H. Peter Anvin 2008-04-17 41 unsigned long start_address;
fe770bf03 H. Peter Anvin 2008-04-17 42 const char *name;
3891a04aa H. Peter Anvin 2014-04-29 43 unsigned long max_lines;
fe770bf03 H. Peter Anvin 2008-04-17 44 };
926e5392b Arjan van de Ven 2008-04-17 45
92851e2fc Andres Salomon 2010-07-20 46 /* indices for address_markers; keep sync'd w/ address_markers below */
92851e2fc Andres Salomon 2010-07-20 47 enum address_markers_idx {
92851e2fc Andres Salomon 2010-07-20 48 USER_SPACE_NR = 0,
92851e2fc Andres Salomon 2010-07-20 49 #ifdef CONFIG_X86_64
92851e2fc Andres Salomon 2010-07-20 50 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 51 LOW_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 52 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 53 VMEMMAP_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 54 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 55 ESPFIX_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 56 # endif
92851e2fc Andres Salomon 2010-07-20 57 HIGH_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 58 MODULES_VADDR_NR,
92851e2fc Andres Salomon 2010-07-20 59 MODULES_END_NR,
92851e2fc Andres Salomon 2010-07-20 60 #else
92851e2fc Andres Salomon 2010-07-20 61 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 62 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 63 VMALLOC_END_NR,
92851e2fc Andres Salomon 2010-07-20 64 # ifdef CONFIG_HIGHMEM
92851e2fc Andres Salomon 2010-07-20 65 PKMAP_BASE_NR,
92851e2fc Andres Salomon 2010-07-20 66 # endif
92851e2fc Andres Salomon 2010-07-20 67 FIXADDR_START_NR,
92851e2fc Andres Salomon 2010-07-20 68 #endif
92851e2fc Andres Salomon 2010-07-20 69 };
92851e2fc Andres Salomon 2010-07-20 70
fe770bf03 H. Peter Anvin 2008-04-17 71 /* Address space markers hints */
fe770bf03 H. Peter Anvin 2008-04-17 72 static struct addr_marker address_markers[] = {
fe770bf03 H. Peter Anvin 2008-04-17 73 { 0, "User Space" },
fe770bf03 H. Peter Anvin 2008-04-17 74 #ifdef CONFIG_X86_64
fe770bf03 H. Peter Anvin 2008-04-17 75 { 0x8000000000000000UL, "Kernel Space" },
0483e1fa6 Thomas Garnier 2016-06-21 76 { 0/* PAGE_OFFSET */, "Low Kernel Mapping" },
0483e1fa6 Thomas Garnier 2016-06-21 77 { 0/* VMALLOC_START */, "vmalloc() Area" },
0483e1fa6 Thomas Garnier 2016-06-21 78 { 0/* VMEMMAP_START */, "Vmemmap" },
8a5a5d153 Mathias Krause 2014-09-07 79 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 80 { ESPFIX_BASE_ADDR, "ESPfix Area", 16 },
8a5a5d153 Mathias Krause 2014-09-07 81 # endif
8266e31ed Mathias Krause 2014-09-21 82 # ifdef CONFIG_EFI
8266e31ed Mathias Krause 2014-09-21 83 { EFI_VA_END, "EFI Runtime Services" },
8266e31ed Mathias Krause 2014-09-21 84 # endif
fe770bf03 H. Peter Anvin 2008-04-17 85 { __START_KERNEL_map, "High Kernel Mapping" },
9a79cf9c1 Yinghai Lu 2008-03-07 86 { MODULES_VADDR, "Modules" },
9a79cf9c1 Yinghai Lu 2008-03-07 @87 { MODULES_END, "End Modules" },
fe770bf03 H. Peter Anvin 2008-04-17 88 #else
fe770bf03 H. Peter Anvin 2008-04-17 89 { PAGE_OFFSET, "Kernel Mapping" },
fe770bf03 H. Peter Anvin 2008-04-17 90 { 0/* VMALLOC_START */, "vmalloc() Area" },
:::::: The code at line 87 was first introduced by commit
:::::: 9a79cf9c1aa671325fa5ba37576c2cee23823d04 x86: sort address_markers for dump_pagetables
:::::: TO: Yinghai Lu <yhlu.kernel@gmail.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25184 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-17 0:37 ` kbuild test robot
0 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:37 UTC (permalink / raw)
To: Thomas Garnier
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H . Peter Anvin,
Jonathan Corbet, Thomas Garnier, Kees Cook, Lorenzo Stoakes,
Juergen Gross, Andy Lutomirski, Rafael J . Wysocki, Len Brown,
Pavel Machek, Jiri Kosina, Matt Fleming, Ard Biesheuvel,
Boris Ostrovsky, Rusty Russell, Borislav Petkov,
Christian Borntraeger, Brian Gerst
[-- Attachment #1: Type: text/plain, Size: 8138 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-h0-02170640 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
>> arch/x86/mm/dump_pagetables.c:87:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
{ MODULES_END, "End Modules" },
^
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^
cc1: some warnings being treated as errors
vim +/__fix_to_virt +87 arch/x86/mm/dump_pagetables.c
926e5392b Arjan van de Ven 2008-04-17 9 * This program is free software; you can redistribute it and/or
926e5392b Arjan van de Ven 2008-04-17 10 * modify it under the terms of the GNU General Public License
926e5392b Arjan van de Ven 2008-04-17 11 * as published by the Free Software Foundation; version 2
926e5392b Arjan van de Ven 2008-04-17 12 * of the License.
926e5392b Arjan van de Ven 2008-04-17 13 */
926e5392b Arjan van de Ven 2008-04-17 14
fe770bf03 H. Peter Anvin 2008-04-17 @15 #include <linux/debugfs.h>
fe770bf03 H. Peter Anvin 2008-04-17 16 #include <linux/mm.h>
84e629b66 Paul Gortmaker 2016-07-13 17 #include <linux/init.h>
146fbb766 Andrey Ryabinin 2017-02-10 18 #include <linux/sched.h>
926e5392b Arjan van de Ven 2008-04-17 19 #include <linux/seq_file.h>
926e5392b Arjan van de Ven 2008-04-17 20
926e5392b Arjan van de Ven 2008-04-17 21 #include <asm/pgtable.h>
926e5392b Arjan van de Ven 2008-04-17 22
926e5392b Arjan van de Ven 2008-04-17 23 /*
926e5392b Arjan van de Ven 2008-04-17 24 * The dumper groups pagetable entries of the same type into one, and for
926e5392b Arjan van de Ven 2008-04-17 25 * that it needs to keep some state when walking, and flush this state
926e5392b Arjan van de Ven 2008-04-17 26 * when a "break" in the continuity is found.
926e5392b Arjan van de Ven 2008-04-17 27 */
926e5392b Arjan van de Ven 2008-04-17 28 struct pg_state {
926e5392b Arjan van de Ven 2008-04-17 29 int level;
926e5392b Arjan van de Ven 2008-04-17 30 pgprot_t current_prot;
926e5392b Arjan van de Ven 2008-04-17 31 unsigned long start_address;
926e5392b Arjan van de Ven 2008-04-17 32 unsigned long current_address;
fe770bf03 H. Peter Anvin 2008-04-17 33 const struct addr_marker *marker;
3891a04aa H. Peter Anvin 2014-04-29 34 unsigned long lines;
ef6bea6dd Borislav Petkov 2014-01-18 35 bool to_dmesg;
e1a58320a Stephen Smalley 2015-10-05 36 bool check_wx;
e1a58320a Stephen Smalley 2015-10-05 37 unsigned long wx_pages;
926e5392b Arjan van de Ven 2008-04-17 38 };
926e5392b Arjan van de Ven 2008-04-17 39
fe770bf03 H. Peter Anvin 2008-04-17 40 struct addr_marker {
fe770bf03 H. Peter Anvin 2008-04-17 41 unsigned long start_address;
fe770bf03 H. Peter Anvin 2008-04-17 42 const char *name;
3891a04aa H. Peter Anvin 2014-04-29 43 unsigned long max_lines;
fe770bf03 H. Peter Anvin 2008-04-17 44 };
926e5392b Arjan van de Ven 2008-04-17 45
92851e2fc Andres Salomon 2010-07-20 46 /* indices for address_markers; keep sync'd w/ address_markers below */
92851e2fc Andres Salomon 2010-07-20 47 enum address_markers_idx {
92851e2fc Andres Salomon 2010-07-20 48 USER_SPACE_NR = 0,
92851e2fc Andres Salomon 2010-07-20 49 #ifdef CONFIG_X86_64
92851e2fc Andres Salomon 2010-07-20 50 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 51 LOW_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 52 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 53 VMEMMAP_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 54 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 55 ESPFIX_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 56 # endif
92851e2fc Andres Salomon 2010-07-20 57 HIGH_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 58 MODULES_VADDR_NR,
92851e2fc Andres Salomon 2010-07-20 59 MODULES_END_NR,
92851e2fc Andres Salomon 2010-07-20 60 #else
92851e2fc Andres Salomon 2010-07-20 61 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 62 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 63 VMALLOC_END_NR,
92851e2fc Andres Salomon 2010-07-20 64 # ifdef CONFIG_HIGHMEM
92851e2fc Andres Salomon 2010-07-20 65 PKMAP_BASE_NR,
92851e2fc Andres Salomon 2010-07-20 66 # endif
92851e2fc Andres Salomon 2010-07-20 67 FIXADDR_START_NR,
92851e2fc Andres Salomon 2010-07-20 68 #endif
92851e2fc Andres Salomon 2010-07-20 69 };
92851e2fc Andres Salomon 2010-07-20 70
fe770bf03 H. Peter Anvin 2008-04-17 71 /* Address space markers hints */
fe770bf03 H. Peter Anvin 2008-04-17 72 static struct addr_marker address_markers[] = {
fe770bf03 H. Peter Anvin 2008-04-17 73 { 0, "User Space" },
fe770bf03 H. Peter Anvin 2008-04-17 74 #ifdef CONFIG_X86_64
fe770bf03 H. Peter Anvin 2008-04-17 75 { 0x8000000000000000UL, "Kernel Space" },
0483e1fa6 Thomas Garnier 2016-06-21 76 { 0/* PAGE_OFFSET */, "Low Kernel Mapping" },
0483e1fa6 Thomas Garnier 2016-06-21 77 { 0/* VMALLOC_START */, "vmalloc() Area" },
0483e1fa6 Thomas Garnier 2016-06-21 78 { 0/* VMEMMAP_START */, "Vmemmap" },
8a5a5d153 Mathias Krause 2014-09-07 79 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 80 { ESPFIX_BASE_ADDR, "ESPfix Area", 16 },
8a5a5d153 Mathias Krause 2014-09-07 81 # endif
8266e31ed Mathias Krause 2014-09-21 82 # ifdef CONFIG_EFI
8266e31ed Mathias Krause 2014-09-21 83 { EFI_VA_END, "EFI Runtime Services" },
8266e31ed Mathias Krause 2014-09-21 84 # endif
fe770bf03 H. Peter Anvin 2008-04-17 85 { __START_KERNEL_map, "High Kernel Mapping" },
9a79cf9c1 Yinghai Lu 2008-03-07 86 { MODULES_VADDR, "Modules" },
9a79cf9c1 Yinghai Lu 2008-03-07 @87 { MODULES_END, "End Modules" },
fe770bf03 H. Peter Anvin 2008-04-17 88 #else
fe770bf03 H. Peter Anvin 2008-04-17 89 { PAGE_OFFSET, "Kernel Mapping" },
fe770bf03 H. Peter Anvin 2008-04-17 90 { 0/* VMALLOC_START */, "vmalloc() Area" },
:::::: The code at line 87 was first introduced by commit
:::::: 9a79cf9c1aa671325fa5ba37576c2cee23823d04 x86: sort address_markers for dump_pagetables
:::::: TO: Yinghai Lu <yhlu.kernel@gmail.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25184 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
2017-02-16 21:54 ` Thomas Garnier
(?)
(?)
@ 2017-02-17 0:37 ` kbuild test robot
-1 siblings, 0 replies; 19+ messages in thread
From: kbuild test robot @ 2017-02-17 0:37 UTC (permalink / raw)
To: Thomas Garnier
Cc: linux-efi, Stanislaw Gruszka, linux-doc, kvm,
Radim Krčmář,
Matt Fleming, Dave Hansen, Pavel Machek, H . Peter Anvin,
kernel-hardening, Jiri Olsa, Thomas Gleixner, Andi Kleen,
Jonathan Corbet, Michael Ellerman, Joerg Roedel, x86,
Paul Gortmaker, Christian Borntraeger, Ingo Molnar, xen-devel,
Borislav Petkov, Len Brown, Jiri Kosina, Kees Cook,
Arnd Bergmann
[-- Attachment #1: Type: text/plain, Size: 8138 bytes --]
Hi Thomas,
[auto build test ERROR on next-20170216]
[also build test ERROR on v4.10-rc8]
[cannot apply to tip/x86/core kvm/linux-next tip/auto-latest v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Garnier/x86-mm-Adapt-MODULES_END-based-on-Fixmap-section-size/20170217-072759
config: x86_64-randconfig-h0-02170640 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
>> arch/x86/mm/dump_pagetables.c:87:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
{ MODULES_END, "End Modules" },
^
In file included from arch/x86/include/asm/pgtable_types.h:240:0,
from arch/x86/include/asm/paravirt_types.h:44,
from arch/x86/include/asm/ptrace.h:71,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/debugfs.h:18,
from arch/x86/mm/dump_pagetables.c:15:
>> arch/x86/include/asm/pgtable_64_types.h:71:37: error: '__end_of_fixed_addresses' undeclared here (not in a function)
#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
^
>> arch/x86/mm/dump_pagetables.c:87:4: note: in expansion of macro 'MODULES_END'
{ MODULES_END, "End Modules" },
^
cc1: some warnings being treated as errors
vim +/__fix_to_virt +87 arch/x86/mm/dump_pagetables.c
926e5392b Arjan van de Ven 2008-04-17 9 * This program is free software; you can redistribute it and/or
926e5392b Arjan van de Ven 2008-04-17 10 * modify it under the terms of the GNU General Public License
926e5392b Arjan van de Ven 2008-04-17 11 * as published by the Free Software Foundation; version 2
926e5392b Arjan van de Ven 2008-04-17 12 * of the License.
926e5392b Arjan van de Ven 2008-04-17 13 */
926e5392b Arjan van de Ven 2008-04-17 14
fe770bf03 H. Peter Anvin 2008-04-17 @15 #include <linux/debugfs.h>
fe770bf03 H. Peter Anvin 2008-04-17 16 #include <linux/mm.h>
84e629b66 Paul Gortmaker 2016-07-13 17 #include <linux/init.h>
146fbb766 Andrey Ryabinin 2017-02-10 18 #include <linux/sched.h>
926e5392b Arjan van de Ven 2008-04-17 19 #include <linux/seq_file.h>
926e5392b Arjan van de Ven 2008-04-17 20
926e5392b Arjan van de Ven 2008-04-17 21 #include <asm/pgtable.h>
926e5392b Arjan van de Ven 2008-04-17 22
926e5392b Arjan van de Ven 2008-04-17 23 /*
926e5392b Arjan van de Ven 2008-04-17 24 * The dumper groups pagetable entries of the same type into one, and for
926e5392b Arjan van de Ven 2008-04-17 25 * that it needs to keep some state when walking, and flush this state
926e5392b Arjan van de Ven 2008-04-17 26 * when a "break" in the continuity is found.
926e5392b Arjan van de Ven 2008-04-17 27 */
926e5392b Arjan van de Ven 2008-04-17 28 struct pg_state {
926e5392b Arjan van de Ven 2008-04-17 29 int level;
926e5392b Arjan van de Ven 2008-04-17 30 pgprot_t current_prot;
926e5392b Arjan van de Ven 2008-04-17 31 unsigned long start_address;
926e5392b Arjan van de Ven 2008-04-17 32 unsigned long current_address;
fe770bf03 H. Peter Anvin 2008-04-17 33 const struct addr_marker *marker;
3891a04aa H. Peter Anvin 2014-04-29 34 unsigned long lines;
ef6bea6dd Borislav Petkov 2014-01-18 35 bool to_dmesg;
e1a58320a Stephen Smalley 2015-10-05 36 bool check_wx;
e1a58320a Stephen Smalley 2015-10-05 37 unsigned long wx_pages;
926e5392b Arjan van de Ven 2008-04-17 38 };
926e5392b Arjan van de Ven 2008-04-17 39
fe770bf03 H. Peter Anvin 2008-04-17 40 struct addr_marker {
fe770bf03 H. Peter Anvin 2008-04-17 41 unsigned long start_address;
fe770bf03 H. Peter Anvin 2008-04-17 42 const char *name;
3891a04aa H. Peter Anvin 2014-04-29 43 unsigned long max_lines;
fe770bf03 H. Peter Anvin 2008-04-17 44 };
926e5392b Arjan van de Ven 2008-04-17 45
92851e2fc Andres Salomon 2010-07-20 46 /* indices for address_markers; keep sync'd w/ address_markers below */
92851e2fc Andres Salomon 2010-07-20 47 enum address_markers_idx {
92851e2fc Andres Salomon 2010-07-20 48 USER_SPACE_NR = 0,
92851e2fc Andres Salomon 2010-07-20 49 #ifdef CONFIG_X86_64
92851e2fc Andres Salomon 2010-07-20 50 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 51 LOW_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 52 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 53 VMEMMAP_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 54 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 55 ESPFIX_START_NR,
8a5a5d153 Mathias Krause 2014-09-07 56 # endif
92851e2fc Andres Salomon 2010-07-20 57 HIGH_KERNEL_NR,
92851e2fc Andres Salomon 2010-07-20 58 MODULES_VADDR_NR,
92851e2fc Andres Salomon 2010-07-20 59 MODULES_END_NR,
92851e2fc Andres Salomon 2010-07-20 60 #else
92851e2fc Andres Salomon 2010-07-20 61 KERNEL_SPACE_NR,
92851e2fc Andres Salomon 2010-07-20 62 VMALLOC_START_NR,
92851e2fc Andres Salomon 2010-07-20 63 VMALLOC_END_NR,
92851e2fc Andres Salomon 2010-07-20 64 # ifdef CONFIG_HIGHMEM
92851e2fc Andres Salomon 2010-07-20 65 PKMAP_BASE_NR,
92851e2fc Andres Salomon 2010-07-20 66 # endif
92851e2fc Andres Salomon 2010-07-20 67 FIXADDR_START_NR,
92851e2fc Andres Salomon 2010-07-20 68 #endif
92851e2fc Andres Salomon 2010-07-20 69 };
92851e2fc Andres Salomon 2010-07-20 70
fe770bf03 H. Peter Anvin 2008-04-17 71 /* Address space markers hints */
fe770bf03 H. Peter Anvin 2008-04-17 72 static struct addr_marker address_markers[] = {
fe770bf03 H. Peter Anvin 2008-04-17 73 { 0, "User Space" },
fe770bf03 H. Peter Anvin 2008-04-17 74 #ifdef CONFIG_X86_64
fe770bf03 H. Peter Anvin 2008-04-17 75 { 0x8000000000000000UL, "Kernel Space" },
0483e1fa6 Thomas Garnier 2016-06-21 76 { 0/* PAGE_OFFSET */, "Low Kernel Mapping" },
0483e1fa6 Thomas Garnier 2016-06-21 77 { 0/* VMALLOC_START */, "vmalloc() Area" },
0483e1fa6 Thomas Garnier 2016-06-21 78 { 0/* VMEMMAP_START */, "Vmemmap" },
8a5a5d153 Mathias Krause 2014-09-07 79 # ifdef CONFIG_X86_ESPFIX64
3891a04aa H. Peter Anvin 2014-04-29 80 { ESPFIX_BASE_ADDR, "ESPfix Area", 16 },
8a5a5d153 Mathias Krause 2014-09-07 81 # endif
8266e31ed Mathias Krause 2014-09-21 82 # ifdef CONFIG_EFI
8266e31ed Mathias Krause 2014-09-21 83 { EFI_VA_END, "EFI Runtime Services" },
8266e31ed Mathias Krause 2014-09-21 84 # endif
fe770bf03 H. Peter Anvin 2008-04-17 85 { __START_KERNEL_map, "High Kernel Mapping" },
9a79cf9c1 Yinghai Lu 2008-03-07 86 { MODULES_VADDR, "Modules" },
9a79cf9c1 Yinghai Lu 2008-03-07 @87 { MODULES_END, "End Modules" },
fe770bf03 H. Peter Anvin 2008-04-17 88 #else
fe770bf03 H. Peter Anvin 2008-04-17 89 { PAGE_OFFSET, "Kernel Mapping" },
fe770bf03 H. Peter Anvin 2008-04-17 90 { 0/* VMALLOC_START */, "vmalloc() Area" },
:::::: The code at line 87 was first introduced by commit
:::::: 9a79cf9c1aa671325fa5ba37576c2cee23823d04 x86: sort address_markers for dump_pagetables
:::::: TO: Yinghai Lu <yhlu.kernel@gmail.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25184 bytes --]
[-- Attachment #3: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-16 21:54 ` Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-16 21:54 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Jonathan Corbet,
Thomas Garnier, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He Chen, Luis R . Rodriguez, Stanislaw Gruszka,
Arnd Bergmann, Peter Zijlstra, Dave Hansen, Vitaly Kuznetsov,
Paul Gortmaker, Josh Poimboeuf, Tim Chen, Andi Kleen, Jiri Olsa,
Michael Ellerman, Joerg Roedel, Paolo Bonzini,
Radim Krčmář,
Andy Lutomirski
Cc: x86, linux-kernel, linux-doc, linux-pm, linux-efi, xen-devel,
lguest, kvm, kernel-hardening
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 <thgarnie@google.com>
---
Based on next-20170213
---
Documentation/x86/x86_64/mm.txt | 5 ++++-
arch/x86/include/asm/pgtable_64_types.h | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
--
2.11.0.483.g087da7b7c-goog
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-16 21:54 ` Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-16 21:54 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Jonathan Corbet,
Thomas Garnier, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He
Cc: x86, linux-kernel, linux-doc, linux-pm, linux-efi, xen-devel,
lguest, kvm, kernel-hardening
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 <thgarnie@google.com>
---
Based on next-20170213
---
Documentation/x86/x86_64/mm.txt | 5 ++++-
arch/x86/include/asm/pgtable_64_types.h | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
--
2.11.0.483.g087da7b7c-goog
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size
@ 2017-02-16 21:54 ` Thomas Garnier
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Garnier @ 2017-02-16 21:54 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Jonathan Corbet,
Thomas Garnier, Kees Cook, Lorenzo Stoakes, Juergen Gross,
Andy Lutomirski, Rafael J . Wysocki, Len Brown, Pavel Machek,
Jiri Kosina, Matt Fleming, Ard Biesheuvel, Boris Ostrovsky,
Rusty Russell, Borislav Petkov, Christian Borntraeger,
Brian Gerst, He
Cc: x86, linux-kernel, linux-doc, linux-pm, linux-efi, xen-devel,
lguest, kvm, kernel-hardening
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 <thgarnie@google.com>
---
Based on next-20170213
---
Documentation/x86/x86_64/mm.txt | 5 ++++-
arch/x86/include/asm/pgtable_64_types.h | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 5724092db811..ee3f9c30957c 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -19,7 +19,7 @@ ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
... unused hole ...
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
+ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
@@ -39,6 +39,9 @@ memory window (this size is arbitrary, it can be raised later if needed).
The mappings are not part of any other kernel PGD and are only available
during EFI runtime calls.
+The module mapping space size changes based on the CONFIG requirements for the
+following fixmap section.
+
Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
physical memory, vmalloc/ioremap space and virtual memory map are randomized.
Their order is preserved but their base will be offset early at boot time.
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
index 3a264200c62f..bb05e21cf3c7 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -67,7 +67,8 @@ typedef struct { pteval_t pte; } pte_t;
#endif /* CONFIG_RANDOMIZE_MEMORY */
#define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
-#define MODULES_END _AC(0xffffffffff000000, UL)
+/* The module sections ends with the start of the fixmap */
+#define MODULES_END __fix_to_virt(__end_of_fixed_addresses + 1)
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
--
2.11.0.483.g087da7b7c-goog
^ permalink raw reply related [flat|nested] 19+ messages in thread
end of thread, other threads:[~2017-02-17 20:53 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 21:54 [PATCH v4 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size Thomas Garnier
2017-02-16 21:54 Thomas Garnier
2017-02-16 21:54 ` Thomas Garnier
2017-02-16 21:54 ` Thomas Garnier
2017-02-17 0:37 ` kbuild test robot
2017-02-17 0:37 ` kbuild test robot
2017-02-17 0:37 ` kbuild test robot
2017-02-17 0:37 ` kbuild test robot
2017-02-17 0:45 ` kbuild test robot
2017-02-17 0:45 ` kbuild test robot
2017-02-17 0:45 ` kbuild test robot
2017-02-17 0:45 ` kbuild test robot
2017-02-17 16:00 ` Thomas Garnier
2017-02-17 16:00 ` Thomas Garnier
2017-02-17 16:00 ` Thomas Garnier
2017-02-17 20:52 ` Thomas Garnier
2017-02-17 20:52 ` Thomas Garnier
2017-02-17 20:52 ` Thomas Garnier
2017-02-17 20:52 ` Thomas Garnier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.