Re: KASLR causes intermittent boot failures on some systems

2017-05-01 Thread Baoquan He
Hi, The root cause has been found out finally. It's caused by code bug in sync_global_pgds which is wrong for loop count calculation. Will post patch. Thanks Baoquan On 04/07/17 at 10:41am, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >

Re: KASLR causes intermittent boot failures on some systems

2017-05-01 Thread Baoquan He
Hi, The root cause has been found out finally. It's caused by code bug in sync_global_pgds which is wrong for loop count calculation. Will post patch. Thanks Baoquan On 04/07/17 at 10:41am, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Baoquan He
On 04/24/17 at 05:41pm, Thomas Garnier wrote: > On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > > Yeah, according to my debugging tracking, it goes as Dan said. And the > > is_ram is REGION_DISJOINT. And till arch_add_memory, the parameters > > passed to arch_add_memory are

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Baoquan He
On 04/24/17 at 05:41pm, Thomas Garnier wrote: > On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > > Yeah, according to my debugging tracking, it goes as Dan said. And the > > is_ram is REGION_DISJOINT. And till arch_add_memory, the parameters > > passed to arch_add_memory are "arch_add_memory,

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Thomas Garnier
On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > Yeah, according to my debugging tracking, it goes as Dan said. And the > is_ram is REGION_DISJOINT. And till arch_add_memory, the parameters > passed to arch_add_memory are "arch_add_memory, align_start:0x100, >

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Thomas Garnier
On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > Yeah, according to my debugging tracking, it goes as Dan said. And the > is_ram is REGION_DISJOINT. And till arch_add_memory, the parameters > passed to arch_add_memory are "arch_add_memory, align_start:0x100, >

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Baoquan He
On 04/24/17 at 04:18pm, Dan Williams wrote: > On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > > On 04/24/17 at 01:52pm, Dan Williams wrote: > [..] > >> When using the memmap= parameter we're using this call by default: > >> > >> } else if (pmem_should_map_pages(dev))

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Baoquan He
On 04/24/17 at 04:18pm, Dan Williams wrote: > On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > > On 04/24/17 at 01:52pm, Dan Williams wrote: > [..] > >> When using the memmap= parameter we're using this call by default: > >> > >> } else if (pmem_should_map_pages(dev)) { > >>

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Dan Williams
On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > On 04/24/17 at 01:52pm, Dan Williams wrote: [..] >> When using the memmap= parameter we're using this call by default: >> >> } else if (pmem_should_map_pages(dev)) { >> addr = devm_memremap_pages(dev,

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Dan Williams
On Mon, Apr 24, 2017 at 4:07 PM, Baoquan He wrote: > On 04/24/17 at 01:52pm, Dan Williams wrote: [..] >> When using the memmap= parameter we're using this call by default: >> >> } else if (pmem_should_map_pages(dev)) { >> addr = devm_memremap_pages(dev, >res, >>

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Baoquan He
On 04/24/17 at 01:52pm, Dan Williams wrote: > On Mon, Apr 24, 2017 at 1:37 PM, Thomas Garnier wrote: > > ) > > > > On Thu, Apr 20, 2017 at 6:26 AM, Baoquan He wrote: > >> On 04/19/17 at 07:27am, Thomas Garnier wrote: > >>> On Wed, Apr 19, 2017 at 6:36 AM,

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Baoquan He
On 04/24/17 at 01:52pm, Dan Williams wrote: > On Mon, Apr 24, 2017 at 1:37 PM, Thomas Garnier wrote: > > ) > > > > On Thu, Apr 20, 2017 at 6:26 AM, Baoquan He wrote: > >> On 04/19/17 at 07:27am, Thomas Garnier wrote: > >>> On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: > >>> > Hi all, >

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Dan Williams
On Mon, Apr 24, 2017 at 1:37 PM, Thomas Garnier wrote: > ) > > On Thu, Apr 20, 2017 at 6:26 AM, Baoquan He wrote: >> On 04/19/17 at 07:27am, Thomas Garnier wrote: >>> On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: >>> > Hi all, >>> >

Re: KASLR causes intermittent boot failures on some systems

2017-04-24 Thread Dan Williams
On Mon, Apr 24, 2017 at 1:37 PM, Thomas Garnier wrote: > ) > > On Thu, Apr 20, 2017 at 6:26 AM, Baoquan He wrote: >> On 04/19/17 at 07:27am, Thomas Garnier wrote: >>> On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: >>> > Hi all, >>> > >>> > I login in Jeff's system, and added debug code, no

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Baoquan He
On 04/19/17 at 07:34am, Dan Williams wrote: > On Wed, Apr 19, 2017 at 7:27 AM, Thomas Garnier wrote: > > On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: > >> Hi all, > >> > >> I login in Jeff's system, and added debug code, no clue found. However > >>

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Baoquan He
On 04/19/17 at 07:34am, Dan Williams wrote: > On Wed, Apr 19, 2017 at 7:27 AM, Thomas Garnier wrote: > > On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: > >> Hi all, > >> > >> I login in Jeff's system, and added debug code, no clue found. However > >> DaveY found he disabled page_offset

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Thomas Garnier
On Wed, Apr 19, 2017 at 7:34 AM, Dan Williams wrote: > Does the randomization ever cross a pgd boundary? Yes, it can cross a pgd boundary. The original physical memory mapping might as well but you would need almost 550Gb of memory. > > These crashes look very similar

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Thomas Garnier
On Wed, Apr 19, 2017 at 7:34 AM, Dan Williams wrote: > Does the randomization ever cross a pgd boundary? Yes, it can cross a pgd boundary. The original physical memory mapping might as well but you would need almost 550Gb of memory. > > These crashes look very similar to the crashes caused by >

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Baoquan He
On 04/19/17 at 07:27am, Thomas Garnier wrote: > On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: > > Hi all, > > > > I login in Jeff's system, and added debug code, no clue found. However > > DaveY found he disabled page_offset randomization only and the efi issue > > won't be

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Baoquan He
On 04/19/17 at 07:27am, Thomas Garnier wrote: > On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: > > Hi all, > > > > I login in Jeff's system, and added debug code, no clue found. However > > DaveY found he disabled page_offset randomization only and the efi issue > > won't be seen on his

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 7:27 AM, Thomas Garnier wrote: > On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: >> Hi all, >> >> I login in Jeff's system, and added debug code, no clue found. However >> DaveY found he disabled page_offset randomization only and

Re: KASLR causes intermittent boot failures on some systems

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 7:27 AM, Thomas Garnier wrote: > On Wed, Apr 19, 2017 at 6:36 AM, Baoquan He wrote: >> Hi all, >> >> I login in Jeff's system, and added debug code, no clue found. However >> DaveY found he disabled page_offset randomization only and the efi issue >> won't be seen on his

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Jeff Moyer
Dave Young writes: > On 04/12/17 at 04:24pm, Dave Young wrote: >> I did some tests about emulated pmem via memmap=, kdump kernel hangs or >> just reboots early during compressing kernel, no clue how to handle it. >> Since for kdump kernel kaslr is pointless a workaround is use

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Jeff Moyer
Dave Young writes: > On 04/12/17 at 04:24pm, Dave Young wrote: >> I did some tests about emulated pmem via memmap=, kdump kernel hangs or >> just reboots early during compressing kernel, no clue how to handle it. >> Since for kdump kernel kaslr is pointless a workaround is use "nokaslr" >> >>

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Dave Young
On 04/12/17 at 04:24pm, Dave Young wrote: > On 04/07/17 at 10:41am, Jeff Moyer wrote: > > Hi, > > > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > > regions") causes some of my systems with persistent memory (whether real > > or emulated) to fail to boot with a couple

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Dave Young
On 04/12/17 at 04:24pm, Dave Young wrote: > On 04/07/17 at 10:41am, Jeff Moyer wrote: > > Hi, > > > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > > regions") causes some of my systems with persistent memory (whether real > > or emulated) to fail to boot with a couple

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Dave Young
On 04/12/17 at 04:24pm, Dave Young wrote: > On 04/07/17 at 10:41am, Jeff Moyer wrote: > > Hi, > > > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > > regions") causes some of my systems with persistent memory (whether real > > or emulated) to fail to boot with a couple

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Dave Young
On 04/12/17 at 04:24pm, Dave Young wrote: > On 04/07/17 at 10:41am, Jeff Moyer wrote: > > Hi, > > > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > > regions") causes some of my systems with persistent memory (whether real > > or emulated) to fail to boot with a couple

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Dave Young
On 04/07/17 at 10:41am, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > regions") causes some of my systems with persistent memory (whether real > or emulated) to fail to boot with a couple of different crash > signatures. The first signature

Re: KASLR causes intermittent boot failures on some systems

2017-04-12 Thread Dave Young
On 04/07/17 at 10:41am, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > regions") causes some of my systems with persistent memory (whether real > or emulated) to fail to boot with a couple of different crash > signatures. The first signature

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Kees Cook writes: > On Mon, Apr 10, 2017 at 11:22 AM, Jeff Moyer wrote: >> Kees Cook writes: >> >>> On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: Kees Cook writes: >

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Kees Cook writes: > On Mon, Apr 10, 2017 at 11:22 AM, Jeff Moyer wrote: >> Kees Cook writes: >> >>> On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: Kees Cook writes: > On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm:

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Kees Cook
On Mon, Apr 10, 2017 at 11:22 AM, Jeff Moyer wrote: > Kees Cook writes: > >> On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: >>> Kees Cook writes: >>> On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Kees Cook
On Mon, Apr 10, 2017 at 11:22 AM, Jeff Moyer wrote: > Kees Cook writes: > >> On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: >>> Kees Cook writes: >>> On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Kees Cook writes: > On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: >> Kees Cook writes: >> >>> On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: Hi, commit 021182e52fe01 ("x86/mm: Enable

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Kees Cook writes: > On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: >> Kees Cook writes: >> >>> On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: Hi, commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory regions") causes some of my systems with

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Kees Cook
On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: > Kees Cook writes: > >> On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >>> Hi, >>> >>> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >>> regions") causes

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Kees Cook
On Mon, Apr 10, 2017 at 8:49 AM, Jeff Moyer wrote: > Kees Cook writes: > >> On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >>> Hi, >>> >>> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >>> regions") causes some of my systems with persistent memory (whether real >>>

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Baoquan He writes: > On 04/07/17 at 10:41am, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to fail to boot with a couple of

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Baoquan He writes: > On 04/07/17 at 10:41am, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to fail to boot with a couple of different crash >>

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Kees Cook writes: > On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to

Re: KASLR causes intermittent boot failures on some systems

2017-04-10 Thread Jeff Moyer
Kees Cook writes: > On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to fail to boot with a couple of different crash

Re: KASLR causes intermittent boot failures on some systems

2017-04-08 Thread Baoquan He
Hi Dan, Thanks! On 04/08/17 at 12:02am, Dan Williams wrote: > > I got below problem when configure ndctl, didn't find a package named > > libkmod: > > > > ~ > > configure: error: Package requirements (libkmod) were not met: > > > > No package 'libkmod' found > > kmod-devel provides that

Re: KASLR causes intermittent boot failures on some systems

2017-04-08 Thread Baoquan He
Hi Dan, Thanks! On 04/08/17 at 12:02am, Dan Williams wrote: > > I got below problem when configure ndctl, didn't find a package named > > libkmod: > > > > ~ > > configure: error: Package requirements (libkmod) were not met: > > > > No package 'libkmod' found > > kmod-devel provides that

Re: KASLR causes intermittent boot failures on some systems

2017-04-08 Thread Dan Williams
On Fri, Apr 7, 2017 at 9:08 PM, Baoquan He wrote: > On 04/07/17 at 10:41am, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to fail

Re: KASLR causes intermittent boot failures on some systems

2017-04-08 Thread Dan Williams
On Fri, Apr 7, 2017 at 9:08 PM, Baoquan He wrote: > On 04/07/17 at 10:41am, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to fail to boot with a

Re: KASLR causes intermittent boot failures on some systems

2017-04-07 Thread Kees Cook
On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > regions") causes some of my systems with persistent memory (whether real > or emulated) to fail to boot with a couple of different crash >

Re: KASLR causes intermittent boot failures on some systems

2017-04-07 Thread Kees Cook
On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > regions") causes some of my systems with persistent memory (whether real > or emulated) to fail to boot with a couple of different crash > signatures. The first

Re: KASLR causes intermittent boot failures on some systems

2017-04-07 Thread Jeff Moyer
Thomas Garnier writes: > CCing Kees for information. > > On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory

Re: KASLR causes intermittent boot failures on some systems

2017-04-07 Thread Jeff Moyer
Thomas Garnier writes: > CCing Kees for information. > > On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: >> Hi, >> >> commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory >> regions") causes some of my systems with persistent memory (whether real >> or emulated) to fail to

Re: KASLR causes intermittent boot failures on some systems

2017-04-07 Thread Thomas Garnier
CCing Kees for information. On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > regions") causes some of my systems with persistent memory (whether real > or emulated) to fail to boot with a

Re: KASLR causes intermittent boot failures on some systems

2017-04-07 Thread Thomas Garnier
CCing Kees for information. On Fri, Apr 7, 2017 at 7:41 AM, Jeff Moyer wrote: > Hi, > > commit 021182e52fe01 ("x86/mm: Enable KASLR for physical mapping memory > regions") causes some of my systems with persistent memory (whether real > or emulated) to fail to boot with a couple of different