On 01/25/18 at 06:50pm, Kirill A. Shutemov wrote:
> On Wed, Jan 17, 2018 at 01:24:54PM +0800, Baoquan He wrote:
> > Hi Kirill,
> >
> > I setup qemu 2.9.0 to test 5-level on kexec/kdump support. While both
> > kexec and kdump reset to BIOS immediately after triggering.
On 01/23/18 at 06:20pm, Weilong Chen wrote:
> Hi,
>
> We came across this problem:
> Second kernel hang with intel_iommu=on
>
> We can reproduce the problem by the following steps:
> 1. start the kernel with intel_iommu=on
> 2. ifconfig eth6 up;ifconfig eth8 up.(eth6 is Intel Corporation 82599ES
On 01/16/18 at 11:34am, Luiz Capitulino wrote:
> On Tue, 16 Jan 2018 08:43:20 +0800
> Baoquan He <b...@redhat.com> wrote:
>
> > On 01/15/18 at 08:49pm, Chao Fan wrote:
> > > Hi Luiz,
> > >
> > > I don't know if this patch is OK for you.
> >
Hi Kirill,
I setup qemu 2.9.0 to test 5-level on kexec/kdump support. While both
kexec and kdump reset to BIOS immediately after triggering. I saw your
patch adding 5-level paging support for kexec. Wonder if your test
succeeded to jump into kexec/kdump kernel, and what else I need to
make it. By
CC Eric
On 01/05/18 at 12:37pm, Baoquan He wrote:
> Kdump kernel will become very slow if 'noapic' is specified in kernel
> command line. Normal kernel doesn't have this issue.
>
> This is because the legacy irq mode is disabled in crashed kernel before
> jump jump to kdump kern
CC Eric
On 01/05/18 at 12:39pm, Baoquan He wrote:
> X86 MP spec defines 3 different interrupt modes:
> 1) PIC Mode—bypasses all APIC components and forces the system to
> operate in single-processor mode.
> 2) Virtual Wire Mode—uses an APIC as a virtual wire, b
CC Eric
On 01/05/18 at 12:38pm, Baoquan He wrote:
> In commit
>
> commit 522e66464467 ("x86/apic: Disable I/O APIC before shutdown of the local
> APIC").
>
> lapic_shutdown() invocation is moved after disable_IO_APIC(). In fact
> in disable_IO_APIC(),
On 01/17/18 at 05:47pm, Dou Liyang wrote:
> Hi Baoquan,
>
> At 01/05/2018 12:38 PM, Baoquan He wrote:
> > In commit
> >
> > commit 522e66464467 ("x86/apic: Disable I/O APIC before shutdown of the
> > local APIC").
> >
> > lapic_shutdown
On 01/19/18 at 02:42pm, Dou Liyang wrote:
> Hi Baoquan,
>
> At 01/05/2018 12:39 PM, Baoquan He wrote:
> [...]
> > /*
> > - * Not an __init, needed by kexec/kdump code.
> > - * For safety IO-APIC and Local APIC need be cleared before this.
> > + * In leg
cy_irq_mode before kexec/kdump
jumping.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 3 ++-
arch/x86/kernel/apic/io_apic.c | 12
arch/x86/kernel/crash.c| 2 +-
arch/x86/kernel/machine_kexec_32.c | 15 +--
arc
This is v2 post.
In v2, no code change, just improve change log of patch 1 and 2.
And drop the old patch 3 in v1, a clean up patch. The current
x86_io_apic_ops.disable() hook is still needed by irq remapping.
Baoquan He (2):
x86/apic/kexec: Enable legacy irq mode before jump to kexec/kdump
if 'noapic' specified.
Do it now.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 25ddf02598d2..3fc259b4dd2d 100644
--- a/arch/x86/ke
On 01/12/18 at 01:52pm, Luiz Capitulino wrote:
> On Fri, 12 Jan 2018 10:47:53 +0800
> Chao Fan <fanc.f...@cn.fujitsu.com> wrote:
>
> > On Fri, Jan 12, 2018 at 10:31:52AM +0800, Baoquan He wrote:
> > >On 01/11/18 at 10:04am, Kees Cook wrote:
> > >> On T
On 01/11/18 at 10:04am, Kees Cook wrote:
> On Thu, Jan 11, 2018 at 1:00 AM, Baoquan He <b...@redhat.com> wrote:
> > Hi Luiz,
> >
> > On 01/04/18 at 11:21am, Luiz Capitulino wrote:
> >> Having a generic kaslr parameter to control where the kernel is extracted
&
On 01/11/18 at 01:05pm, Eric W. Biederman wrote:
> Baoquan He <b...@redhat.com> writes:
>
> > Hi all,
> >
> > PING!
> >
> > (Add Fenghua and Eric to this thread)
> >
> > On 01/05/18 at 11:42am, Baoquan He wrote:
> >> On kvm
Hi Kees,
On 01/11/18 at 10:04am, Kees Cook wrote:
> On Thu, Jan 11, 2018 at 1:00 AM, Baoquan He <b...@redhat.com> wrote:
> > Hi Luiz,
> >
> > On 01/04/18 at 11:21am, Luiz Capitulino wrote:
> >> Having a generic kaslr parameter to control where the kern
On 02/01/18 at 05:49am, Dave Hansen wrote:
> On 02/01/2018 02:16 AM, Kirill A. Shutemov wrote:
> > On Thu, Feb 01, 2018 at 03:19:56PM +0800, Baoquan He wrote:
> >> In sparse_init(), we allocate usemap_map and map_map which are pointer
> >> array with the size of
On 02/01/18 at 06:15am, Dave Hansen wrote:
> On 01/31/2018 11:19 PM, Baoquan He wrote:
> > for_each_present_section_nr(0, pnum) {
> > + struct mem_section *ms;
> > + ms = __nr_to_section(pnum);
> > usemap = usemap_map[pnum];
On 02/01/18 at 06:23am, Dave Hansen wrote:
> On 02/01/2018 06:19 AM, Baoquan He wrote:
> >
> > I suppose these functions changed here are only called during system
> > bootup, namely in paging_init(). Hot-add memory goes in a different
> > path, __add_section(
vious CR4 value. This way the code is
> ready for boot-time switching between paging modes.
>
> Fixes: 77ef56e4f0fb ("x86: Enable 5-level paging support via
> CONFIG_X86_5LEVEL=y")
> Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com>
> Reported
On 01/29/18 at 07:19pm, Baoquan He wrote:
> On 01/29/18 at 02:08pm, Kirill A. Shutemov wrote:
> > I've missed that we need to change relocate_kernel() to set CR4.LA57
> > flag if the kernel has 5-level paging enabled.
> >
> > I avoided to use ifdef CONFIG_X86_5LEVEL h
This will make sure number of sections marked as present won't be changed
in sparse_init(), so that for_each_present_section_nr() can iterate
each of them. This is preparation for later fix.
Signed-off-by: Baoquan He <b...@redhat.com>
---
mm/sparse-vmemmap.c | 1 -
mm/sparse.c
much memory on most of systems. Anytime, we should
avoid to define array or allocate memory with the size of NR_MEM_SECTIONS.
Signed-off-by: Baoquan He <b...@redhat.com>
---
mm/sparse-vmemmap.c | 8 +---
mm/sparse.c | 39 +--
2 files chang
, though it's a temporary allocation.
Baoquan He (2):
mm/sparsemem: Defer the ms->section_mem_map clearing a little later
mm/sparse.c: Add nr_present_sections to change the mem_map allocation
mm/sparse-vmemmap.c | 9 +
mm/sparse.c |
On 02/08/18 at 09:14am, Dou Liyang wrote:
> Hi Baoquan,
>
> At 02/07/2018 08:45 PM, Baoquan He wrote:
> > On 02/07/18 at 08:34pm, Dou Liyang wrote:
> > >
> > >
> > > At 02/07/2018 08:27 PM, Baoquan He wrote:
> > > > On 02/07
On 02/11/18 at 09:08pm, Eric W. Biederman wrote:
> Baoquan He <b...@redhat.com> writes:
>
> > This is a regression fix.
> >
> > Before, to fix erratum AVR31, commit 522e66464467 ("x86/apic: Disable
> > I/O APIC before shutdown of the local APIC&q
On 02/11/18 at 11:11pm, Eric W. Biederman wrote:
> Dou Liyang writes:
>
> > Hi all,
> >
> > One thing confused me.
> >
> > The disconnect_bsp_APIC() may restore the interrupt delivery mode into
> > virtual wire mode. it uses the vector F as the spurious interrput, But,
On 02/13/18 at 10:43am, Dou Liyang wrote:
> Hi Baoquan,
>
> At 02/12/2018 11:08 AM, Eric W. Biederman wrote:
> > Baoquan He <b...@redhat.com> writes:
> >
> > > This is a regression fix.
> > >
> > > Before, to fix erratum AVR31, commit
Hi Eric,
On 02/11/18 at 09:08pm, Eric W. Biederman wrote:
> Baoquan He <b...@redhat.com> writes:
>
> > This is a regression fix.
> >
> > Before, to fix erratum AVR31, commit 522e66464467 ("x86/apic: Disable
> > I/O APIC before shutdown of the local APIC&q
is not right.
Correct it.
Add Fixes tag and Cc to stable.
v2->v3:
Change as Eric suggested:
Rerrange patches and change code and messy function/variable naming.
Change patch subject and log to make it more understandable.
Baoquan He (5):
x86/apic: Split out restore_bo
ittle different then reboot and kexec/kdump.
It doesn't call lapic_shutdown() before jump, so is not impacted by
commit 522e66464467. Here in order to keep it the same as the old code,
replace the old disable_IO_APIC() with clear_IO_APIC() and
restore_boot_irq_mode().
Signed-off-by: Baoquan He <
ugh we fix the regression introduced by criminal commit 522e664644,
for safety and clarity, better set up through-local-APIC explicitly,
but not rely on the default boot irq mode.
Do it now.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertio
to x86_apic_ops since it doesn't only
handle IO_APIC, also LAPIC.
And also rename its member variables and the related hooks.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 6 +++---
arch/x86/include/asm/x86_init.h | 8
arch/x86/kernel/apic/io_apic.
No one uses it anymore.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 -
arch/x86/kernel/apic/io_apic.c | 13 -
arch/x86/kernel/machine_kexec_32.c | 5 ++---
arch/x86/kernel/machine_kexec_64.c | 5 ++---
4 files changed, 4 inse
This is a preparation patch. Split out the code which restores boot
irq mode from disable_IO_APIC() and wrap into a new function
restore_boot_irq_mode(). No functional change.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 +
arch/x86/kernel/apic/io_apic
On 02/13/18 at 11:44am, Eric W. Biederman wrote:
> Baoquan He <b...@redhat.com> writes:
>
> > Hi Eric,
> >
> > On 02/11/18 at 09:08pm, Eric W. Biederman wrote:
> >> Baoquan He <b...@redhat.com> writes:
> >>
> >> > This is a
functional change.
Signed-off-by: Baoquan He <b...@redhat.com>
---
v4->v5:
Make this patch to replace disable_IO_APIC() with clear_IO_APIC
and restore_boot_irq_mode() for KEXEC_JUMP path only. This makes
patch easier to review according to Eric's suggestion..
arch/x86/include/as
No one uses it anymore.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 -
arch/x86/kernel/apic/io_apic.c | 13 -
arch/x86/kernel/machine_kexec_32.c | 5 ++---
arch/x86/kernel/machine_kexec_64.c | 5 ++---
4 files changed, 4 inse
This is a preparation patch. Split out the code which restores boot
irq mode from disable_IO_APIC() and wrap into a new function
restore_boot_irq_mode(). No functional change.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 +
arch/x86/kernel/apic/io_apic
]---
[0.001000] masked ExtINT on CPU#0
To fix this, just call clear_IO_APIC() to stop IO_APIC where
disable_IO_APIC() was called, and call restore_boot_irq_mode() to
restore boot irq mode before reboot or kexec/kdump jump.
Signed-off-by: Baoquan He <b...@redhat.com>
Fixes: commit 522
Fixes tag and Cc to stable.
v2->v3:
Change as Eric suggested:
Rerrange patches and change code and messy function/variable naming.
Change patch subject and log to make it more understandable.
*** BLURB HERE ***
Baoquan He (6):
x86/apic: Split out restore_boot_irq_mode from disable_IO_APIC
to x86_apic_ops since it doesn't only
handle IO_APIC, also LAPIC.
And also rename its member variables and the related hooks.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 6 +++---
arch/x86/include/asm/x86_init.h | 8
arch/x86/kernel/apic/io_apic.
ugh we fix the regression introduced by criminal commit 522e664644,
for safety and clarity, better set up through-local-APIC explicitly,
but not rely on the default boot irq mode.
Do it now.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertio
ugh we fix the regression introduced by criminal commit 522e664644,
for safety and clarity, better set up through-local-APIC explicitly,
but not rely on the default boot irq mode.
Do it now.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertio
to x86_apic_ops since it doesn't only
handle IO_APIC, also LAPIC.
And also rename its member variables and the related hooks.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 6 +++---
arch/x86/include/asm/x86_init.h | 8
arch/x86/kernel/apic/io_apic.
This is a preparation patch. Split out the code which restores boot
irq mode from disable_IO_APIC() and wrap into a new function
restore_boot_irq_mode(). No functional change.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 +
arch/x86/kernel/apic/io_apic
efore
reboot or kexec/kdump jump.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 +
arch/x86/kernel/apic/io_apic.c | 2 +-
arch/x86/kernel/crash.c| 3 ++-
arch/x86/kernel/machine_kexec_32.c | 2 +-
arch/x86/kernel/machine_kexec_64.c
No one uses it anymore.
Signed-off-by: Baoquan He <b...@redhat.com>
---
arch/x86/include/asm/io_apic.h | 1 -
arch/x86/kernel/apic/io_apic.c | 13 -
arch/x86/kernel/machine_kexec_32.c | 5 ++---
arch/x86/kernel/machine_kexec_64.c | 5 ++---
4 files changed, 4 inse
ys be seen during kdump kernel boot on qemu/kvm
platform. Our customer even saw casual kdump kernel hang once in
~30 attempts during stress testing of kdump on KVM machine.
This is v3 post, patches are rearranged and changed according to
Eric's suggestions.
Baoquan He (5):
x86/apic:
On 02/07/18 at 01:48pm, Eric W. Biederman wrote:
> ebied...@xmission.com (Eric W. Biederman) writes:
> > Now that I see that I agree in essence with this patch series.
> > I don't agree with the implemenation details.
> >
> > Can you please split disable_IO_APIC and switch_to_legacy_irq_mode
> >
On 02/07/18 at 05:25pm, Dou Liyang wrote:
> Hi All,
>
> I met the makedumpfile failed in the upstream kernel which contained
> this patch. Did I missed something else?
readmem: Can't convert a virtual address(88007ffd7000) to physical
Should not related to this patch. Otherwise your code
On 02/07/18 at 08:00pm, Dou Liyang wrote:
> Hi Kirill,Mike
>
> At 02/07/2018 06:45 PM, Mike Galbraith wrote:
> > On Wed, 2018-02-07 at 13:41 +0300, Kirill A. Shutemov wrote:
> > > On Wed, Feb 07, 2018 at 05:25:05PM +0800, Dou Liyang wrote:
> > > > Hi All,
> > > >
> > > > I met the makedumpfile
On 02/07/18 at 08:17pm, Dou Liyang wrote:
> Hi Baoquan,
>
> At 02/07/2018 08:08 PM, Baoquan He wrote:
> > On 02/07/18 at 08:00pm, Dou Liyang wrote:
> > > Hi Kirill,Mike
> > >
> > > At 02/07/2018 06:45 PM, Mike Galbraith wrote:
> > > > On We
On 02/07/18 at 08:34pm, Dou Liyang wrote:
>
>
> At 02/07/2018 08:27 PM, Baoquan He wrote:
> > On 02/07/18 at 08:17pm, Dou Liyang wrote:
> > > Hi Baoquan,
> > >
> > > At 02/07/2018 08:08 PM, Baoquan He wrote:
> > > > On 02/07/18
On 02/17/18 at 11:46am, Ingo Molnar wrote:
>
> * Baoquan He <b...@redhat.com> wrote:
>
> > Thanks for checking this!
> >
> > I got warning message from kbuild test robot on previous v3 and v4. I
> > guess this v5 post also has the issue since the
Hi Ingo, Eric,
On 02/16/18 at 10:38am, Ingo Molnar wrote:
>
> * Baoquan He <b...@redhat.com> wrote:
>
> > This is v5 post. Newly added patch 0002 includes the change
> > related to KEXEC_JUMP path. Patch 0003 only includes the
> > regression fix.
> &g
-by: Baoquan He <b...@redhat.com>
Signed-off-by: Baoquan He <b...@redhat.com>
---
mm/sparse-vmemmap.c | 8 +---
mm/sparse.c | 40 ++--
2 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmem
) loop. This
is in preparation for later optimizing the mem map allocation.
Signed-off-by: Baoquan He <b...@redhat.com>
---
mm/sparse-vmemmap.c | 1 -
mm/sparse.c | 12
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vme
It's used to record how many memory sections are marked as present
during system boot up, and will be used in the later patch.
Signed-off-by: Baoquan He <b...@redhat.com>
---
mm/sparse.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/sparse.c b/mm/sparse.c
index 7af5e7
allocation code to only use
usemap_map and map_map with the size of nr_present_sections. This
makes kdump kernel boot up with normal crashkernel='' setting when
CONFIG_X86_5LEVEL=y.
Baoquan He (3):
mm/sparse: Add a static variable nr_present_sections
mm/sparsemem: Defer the ms->section_mem_
On 02/22/18 at 05:11pm, Baoquan He wrote:
> This is v2 post. V1 can be found here:
> https://www.spinics.net/lists/linux-mm/msg144486.html
>
> In sparse_init(), two temporary pointer arrays, usemap_map and map_map
> are allocated with the size of NR_MEM_SECTIONS. They are used
usemap_map and map_map with the size of
> > 'nr_present_sections'. For the i-th present memory section, install its
> > usemap and memmap to usemap_map[i] and mam_map[i] during allocation. Then
> > in the last for_each_present_section_nr() loop which clears the failed
> > memory
On 02/22/18 at 01:24pm, Andrew Morton wrote:
> On Thu, 22 Feb 2018 17:11:28 +0800 Baoquan He <b...@redhat.com> wrote:
>
> > It's used to record how many memory sections are marked as present
> > during system boot up, and will be used in the later patch.
> >
>
On 02/22/18 at 02:22pm, Dave Hansen wrote:
> First of all, this is a much-improved changelog. Thanks for that!
>
> On 02/22/2018 01:11 AM, Baoquan He wrote:
> > In sparse_init(), two temporary pointer arrays, usemap_map and map_map
> > are allocated with the si
em_section*).
Fix it.
Signed-off-by: Baoquan He <b...@redhat.com>
Tested-by: Dave Young <dyo...@redhat.com>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Andy Lutomirski <l...@amacapital.net>
Cc: Peter Zijlstra <p
On 12/19/17 at 06:58pm, Jiri Bohac wrote:
Sorry for late response. Please see the inline comments.
>
> On Tue, Dec 19, 2017 at 09:58:04AM +0800, Baoquan He wrote:
> > Hmm, as I have said in the first replying mail, the v2 will introduce
> > issues:
> >
> > 1) If '
On 12/27/17 at 01:25pm, Borislav Petkov wrote:
> On Wed, Dec 27, 2017 at 03:44:49PM +0800, Baoquan He wrote:
> > > yes, instead of crashing the machine (because GART may be initialized in
> > > the
> > > 2nd kernel, overlapping the 1st kernel memory, which
On 01/04/18 at 03:54pm, Alexander Kuleshov wrote:
> we align minimal possible address during randomization to
> CONFIG_PHYSICAL_ALIGN
> two times: during getting of random physical address and virtual
> address (only for x86_64).
>
> Let's move this to choose_random_location() to not duplicate
On 06/21/18 at 05:01pm, Ingo Molnar wrote:
>
> * Baoquan He wrote:
>
> > +/* Store the number of 1GB huge pages which user specified.*/
> > +static unsigned long max_gb_huge_pages;
> > +
> > +static int parse_gb_huge_pages(char *param, char* val)
> > +
Hi Masa,
On 08/21/18 at 09:24am, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma
>
> There are some exceptional cases that the padding used for the physical
> memory mapping section is not enough.
>
> For example of the cases:
> - As Baoquan reported in the following, SGI UV system.
>
igger
than 64TB.
In fact, here MAX_PHYSMEM_BITS should be used instead. Fix it by
by replacing __PHYSICAL_MASK_SHIFT with MAX_PHYSMEM_BITS.
Signed-off-by: Baoquan He
---
arch/x86/mm/kaslr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kas
Vmemmap area has different base and size depending on paging mode.
Now we just hardcode its size as 1TB in memory KASLR, it's not
right for 5-level paging mode.
Adjust it according to paging mode and use it during memory KASLR.
Signed-off-by: Baoquan He
---
arch/x86/include/asm
On 08/27/18 at 02:28pm, Chao Fan wrote:
> >Is it possible to take num_immovable_mem definition out from #ifdef
> >CONFIG_MEMORY_HOTREMOVE block and check it here like below? This way,
> >one level of indentation can be reduced in the for loop, and code is
> >more readable.
> >
>
> I think there
On 08/27/18 at 01:56pm, Baoquan He wrote:
> On 08/07/18 at 02:50pm, Chao Fan wrote:
> > If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable
> If CONFIG_MEMORY_HOTREMOVE is enabled,
> > memory regions is not zero. Calculate the intersection between memory
> &g
On 08/27/18 at 01:35pm, Baoquan He wrote:
> Is it possible to take num_immovable_mem out from the #ifdef
> CONFIG_MEMORY_HOTREMOVE region so that you can check it earlier to see
> if the old way need be taken? This way, we can reduce one level of
> indentation in the for loop. J
On 08/07/18 at 02:50pm, Chao Fan wrote:
> If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable
If CONFIG_MEMORY_HOTREMOVE is enabled,
> memory regions is not zero. Calculate the intersection between memory
> regions from e820/efi memory table and immovable memory regions.
> Or go
On 08/07/18 at 02:49pm, Chao Fan wrote:
> If 'CONFIG_MEMORY_HOTREMOVE' specified, walk the acpi srat memory
> tables, store the immovable memory regions, so that kaslr can get
> the information abouth where can be selected or not.
> If 'CONFIG_MEMORY_HOTREMOVE' not specified, go on the old code.
On 08/27/18 at 10:56am, Chao Fan wrote:
> >> +#ifdef CONFIG_MEMORY_HOTREMOVE
> >> +/*
> >> + * According to ACPI table, filter the immvoable memory regions
> >> + * and store them in immovable_mem[].
> >> + */
> >> +static void handle_immovable_mem(void)
> >
> >Can we change this function like
On 08/07/18 at 02:50pm, Chao Fan wrote:
> If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable
> memory regions is not zero. Calculate the intersection between memory
> regions from e820/efi memory table and immovable memory regions.
> Or go on the old code.
>
> Rename
On 08/07/18 at 02:49pm, Chao Fan wrote:
> If 'CONFIG_MEMORY_HOTREMOVE' specified, walk the acpi srat memory
> tables, store the immovable memory regions, so that kaslr can get
> the information abouth where can be selected or not.
> If 'CONFIG_MEMORY_HOTREMOVE' not specified, go on the old code.
>
On 08/29/18 at 03:05pm, Kirill A. Shutemov wrote:
> On Wed, Aug 29, 2018 at 10:17:54AM +0800, Baoquan He wrote:
> > Vmemmap area has different base and size depending on paging mode.
> > Now we just hardcode its size as 1TB in memory KASLR, it's not
> > right fo
On 08/29/18 at 03:26pm, Kirill A. Shutemov wrote:
> On Wed, Aug 29, 2018 at 08:18:56PM +0800, Baoquan He wrote:
> > On 08/29/18 at 03:05pm, Kirill A. Shutemov wrote:
> > > On Wed, Aug 29, 2018 at 10:17:54AM +0800, Baoquan He wrote:
> > > > Vmemmap area has dif
On 08/29/18 at 03:05pm, Kirill A. Shutemov wrote:
> On Wed, Aug 29, 2018 at 10:17:54AM +0800, Baoquan He wrote:
> > Vmemmap area has different base and size depending on paging mode.
> > Now we just hardcode its size as 1TB in memory KASLR, it's not
> > right fo
On 07/16/18 at 05:24pm, Michal Hocko wrote:
> On Mon 16-07-18 21:02:02, Baoquan He wrote:
> > On 07/16/18 at 01:38pm, Michal Hocko wrote:
> > > On Fri 13-07-18 07:52:40, Baoquan He wrote:
> > > > Hi Michal,
> > > >
> > > > On 07/12/18 at 0
Hi chao,
On 07/23/18 at 05:29pm, Chao Fan wrote:
> In order to parse ACPI tables, reuse the head file linux/acpi.h,
> so that the files in 'compressed' directory can read ACPI table
> by including this head file.
>
> Signed-off-by: Chao Fan
> ---
> arch/x86/boot/compressed/acpitb.h | 7 +++
On 07/23/18 at 04:34pm, Michal Hocko wrote:
> On Thu 19-07-18 23:17:53, Baoquan He wrote:
> > Kexec has been a formal feature in our distro, and customers owning
> > those kind of very large machine can make use of this feature to speed
> > up the reboot process. On uefi ma
On 07/24/18 at 04:36pm, Chao Fan wrote:
> On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
> >Hi chao,
> >
> >On 07/23/18 at 05:29pm, Chao Fan wrote:
> >> In order to parse ACPI tables, reuse the head file linux/acpi.h,
> >> so that the files
On 07/16/18 at 01:38pm, Michal Hocko wrote:
> On Fri 13-07-18 07:52:40, Baoquan He wrote:
> > Hi Michal,
> >
> > On 07/12/18 at 02:32pm, Michal Hocko wrote:
> [...]
> > > I am not able to find the beginning of the email thread right now. Could
> > > you s
We can still use 'kernelcore=mirror' or 'movable_node' for the usage
of hotplug and movable zone. If somebody shows up with a valid usecase
we can reconsider.
Suggested-by: Michal Hocko
Signed-off-by: Baoquan He
---
Documentation/admin-guide/kernel-parameters.txt | 2 ++
mm/page_alloc.c
it was
touchde by other people.
Any comment about this? I can change accordingly.
>From b19955ec5d439f7cb580331c83a27ad5753b06b6 Mon Sep 17 00:00:00 2001
From: Baoquan He
Date: Thu, 30 Aug 2018 11:45:13 +0800
Subject: [PATCH] x86/mm/KASLR: Calculate the actual size of vmemmap region
Vmemmap region
On 09/04/18 at 11:13am, Kirill A. Shutemov wrote:
> On Mon, Sep 03, 2018 at 10:52:13PM +0800, Baoquan He wrote:
> > On 09/03/18 at 01:26pm, Kirill A. Shutemov wrote:
> > > > > But there's corner case when struct page is unreasonably large and
> > > > >
.
Here 1/4 of PAGE_SIZE is chosen since system must have been insane
with this value. For those systems with PAGE_SIZE larger than 4KB,
1KB is simply taken.
Suggested-by: Kirill A. Shutemov
Signed-off-by: Baoquan He
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm
igger
than 64TB.
In fact, here MAX_PHYSMEM_BITS should be used instead. Fix it by
replacing __PHYSICAL_MASK_SHIFT with MAX_PHYSMEM_BITS.
Fixes: b83ce5ee9147 ("x86/mm/64: Make __PHYSICAL_MASK_SHIFT always 52")
Signed-off-by: Baoquan He
Acked-by: Kirill A. Shutemov
Reviewed-by: Thomas Garni
.
So here calculate how many TB by the actual size of vmemmap region
and align up to 1TB boundary.
Signed-off-by: Baoquan He
---
arch/x86/mm/kaslr.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
index 0988971069c9
Hi Pingfan,
On 09/06/18 at 10:36am, Pingfan Liu wrote:
> commit 747ff6265db4 ("x86/boot/KASLR: Skip specified number of 1GB huge
> pages when doing physical randomization (KASLR)") and commit
> 9b912485e0e7 ("x86/boot/KASLR: Add two new functions for 1GB huge pages
> handling") prevent the
On 09/08/18 at 02:10pm, Thomas Gleixner wrote:
> On Wed, 29 Aug 2018, Baoquan He wrote:
>
> > In memory KASLR, __PHYSICAL_MASK_SHIFT is taken to calculate the
> > initial size of the direct mapping region. This is right in the
> > old code where __PHYSICAL_MASK_SHIFT was e
On 09/05/18 at 03:09pm, Kirill A. Shutemov wrote:
> On Wed, Sep 05, 2018 at 08:15:31AM +0000, Baoquan He wrote:
> > On 09/04/18 at 11:13am, Kirill A. Shutemov wrote:
> > > On Mon, Sep 03, 2018 at 10:52:13PM +0800, Baoquan He wrote:
> > > > On 09/03/18 at 01:
On 09/10/18 at 09:41pm, kbuild test robot wrote:
>include/linux/build_bug.h:69:2: note: in expansion of macro
> 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> ^~~~
> >> mm/page_alloc.c:6852:2: note: in expansion of macro
On 09/11/18 at 09:59am, Ingo Molnar wrote:
>
> * Baoquan He wrote:
>
> > /*
> > + * Memory regions randomized by KASLR (except modules that use a separate
> > + * logic earlier during boot). Currently they are the physical memory
> > + * mapping, vmalloc and v
On 09/10/18 at 08:11am, Ingo Molnar wrote:
>
> * Baoquan He wrote:
>
> > @@ -108,6 +109,14 @@ void __init kernel_randomize_memory(void)
> > if (memory_tb < kaslr_regions[0].size_tb)
> > kaslr_regions[0].size_tb = memory_tb;
> >
> &g
1101 - 1200 of 3124 matches
Mail list logo