Re: [PATCH 2/7] kexec_file,x86,powerpc: factor out kexec_file_ops functions

2018-03-01 Thread Dave Young
On 03/02/18 at 04:16pm, AKASHI Takahiro wrote: > On Fri, Mar 02, 2018 at 02:08:57PM +0800, Dave Young wrote: > > On 03/02/18 at 01:53pm, Dave Young wrote: > > > On 03/02/18 at 02:24pm, AKASHI Takahiro wrote: > > > > On Fri, Mar 02, 2018 at 01:04:26PM +0800, Dave Young wrote: > > > > > On 02/27/18

Re: [PATCH 1/7] kexec_file: make an use of purgatory optional

2018-03-01 Thread AKASHI Takahiro
On Fri, Mar 02, 2018 at 02:11:14PM +0800, Dave Young wrote: > On 03/02/18 at 01:58pm, Dave Young wrote: > > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > > On arm64, crash dump kernel's usable memory is protected by > > > *unmapping* it from kernel virtual space unlike other architectures > >

Re: [PATCH 2/7] kexec_file,x86,powerpc: factor out kexec_file_ops functions

2018-03-01 Thread AKASHI Takahiro
On Fri, Mar 02, 2018 at 02:08:57PM +0800, Dave Young wrote: > On 03/02/18 at 01:53pm, Dave Young wrote: > > On 03/02/18 at 02:24pm, AKASHI Takahiro wrote: > > > On Fri, Mar 02, 2018 at 01:04:26PM +0800, Dave Young wrote: > > > > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > > > > As

Re: [PATCH 1/7] kexec_file: make an use of purgatory optional

2018-03-01 Thread Dave Young
On 03/02/18 at 01:58pm, Dave Young wrote: > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > On arm64, crash dump kernel's usable memory is protected by > > *unmapping* it from kernel virtual space unlike other architectures > > where the region is just made read-only. It is highly unlikely that

Re: [PATCH 2/7] kexec_file,x86,powerpc: factor out kexec_file_ops functions

2018-03-01 Thread Dave Young
On 03/02/18 at 01:53pm, Dave Young wrote: > On 03/02/18 at 02:24pm, AKASHI Takahiro wrote: > > On Fri, Mar 02, 2018 at 01:04:26PM +0800, Dave Young wrote: > > > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > > > As arch_kexec_kernel_image_{probe,load}(), > > > >

Re: [PATCH 2/7] kexec_file,x86,powerpc: factor out kexec_file_ops functions

2018-03-01 Thread Dave Young
On 03/02/18 at 02:24pm, AKASHI Takahiro wrote: > On Fri, Mar 02, 2018 at 01:04:26PM +0800, Dave Young wrote: > > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > > As arch_kexec_kernel_image_{probe,load}(), > > > arch_kimage_file_post_load_cleanup() and arch_kexec_kernel_verify_sig() > > > are

Re: [PATCH 6/7] x86: kexec_file: clean up prepare_elf64_headers()

2018-03-01 Thread Dave Young
On 03/02/18 at 02:58pm, AKASHI Takahiro wrote: > On Fri, Mar 02, 2018 at 01:39:45PM +0800, Dave Young wrote: > > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > > removing bufp variable in prepare_elf64_headers() makes the code simpler > > > and more understandable. > > > > > > Signed-off-by:

Re: [PATCH 1/7] kexec_file: make an use of purgatory optional

2018-03-01 Thread Dave Young
On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > On arm64, crash dump kernel's usable memory is protected by > *unmapping* it from kernel virtual space unlike other architectures > where the region is just made read-only. It is highly unlikely that > the region is accidentally corrupted and this

[PATCH 4/4] arch/x86_64: Add 5-level paging support

2018-03-01 Thread Baoquan He
From: Dou Liyang Now, kernel can use 5-level page tables in x86_64 system. Add the 5-level paging support for makedumpfile. Signed-off-by: Dou Liyang --- arch/x86_64.c | 76 ++

[PATCH 0/4] Makedumpfile: Add 5-level paging support

2018-03-01 Thread Baoquan He
Kernel has 5-level paging support and now can support boot-time switching between 4/5-level paging mode. This patchset is used to add 5-level paging support in makedumpfile. A kernel fix is posted to export 'pgtable_l5_enabled' to tell if the corrupted kernel is in 5-level paging mode.

[PATCH 1/4] arch/x86_64: Cleanup the address translation of the 4-level page tables

2018-03-01 Thread Baoquan He
From: Dou Liyang Due to the changing of 4-level page tables implementation in kernel, makedumpfile left behind some of the redundant macros. this make the translation not clear and hard to expand the code to support 5-level page tables. Remove the PML4* and PGDIR_*

[PATCH 3/4] Makedumpfile: Add a new function check_5level_paging()

2018-03-01 Thread Baoquan He
Use it to check if the corrupted kernel is in 5-level paging. Signed-off-by: Baoquan He --- arch/x86_64.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/x86_64.c b/arch/x86_64.c index cbe45c2..e88ee0b 100644 --- a/arch/x86_64.c +++ b/arch/x86_64.c @@ -33,6

[PATCH 2/4] Makedumpfile: Add pgtable_l5_enabled to number_table

2018-03-01 Thread Baoquan He
This is in preparation for later 5-level supporting. Signed-off-by: Baoquan He --- makedumpfile.c | 3 +++ makedumpfile.h | 1 + 2 files changed, 4 insertions(+) diff --git a/makedumpfile.c b/makedumpfile.c index ed138d3..c1e893a 100644 --- a/makedumpfile.c +++

Re: [PATCH 6/7] x86: kexec_file: clean up prepare_elf64_headers()

2018-03-01 Thread Dave Young
On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > removing bufp variable in prepare_elf64_headers() makes the code simpler > and more understandable. > > Signed-off-by: AKASHI Takahiro > Cc: Dave Young > Cc: Vivek Goyal > Cc:

Re: [PATCH 5/7] x86: kexec_file: lift CRASH_MAX_RANGES limit on crash_mem buffer

2018-03-01 Thread AKASHI Takahiro
On Fri, Mar 02, 2018 at 01:31:53PM +0800, Dave Young wrote: > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > While CRASH_MAX_RANGES (== 16) seems to be good enough, fixed-number > > array is not a good idea in general. > > > > In this patch, size of crash_mem buffer is calculated as before

RE: [PATCH] makedumpfile/arm64: Add '--mem-usage' support

2018-03-01 Thread Masaki Tachibana
Hi Bhupesh, Sorry for the late reply. And thank you for your patch. I have some questions. Please answer me. - Have you succeeded --mem-usage on ppc64, s390x ? - By your patch, makedumpfile behaves like this; 1.Gets an address of _stext from a vmlinux file. 2.Checks how many upper bits are 1

Re: [PATCH 4/7] x86: kexec_file: remove X86_64 dependency from prepare_elf64_headers()

2018-03-01 Thread AKASHI Takahiro
On Fri, Mar 02, 2018 at 01:19:56PM +0800, Dave Young wrote: > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > The code guarded by CONFIG_X86_64 is necessary on some architectures > > which have a dedicated kernel mapping outside of linear memory mapping. > > (arm64 is among those.) > > > > In

Re: [PATCH 5/7] x86: kexec_file: lift CRASH_MAX_RANGES limit on crash_mem buffer

2018-03-01 Thread Dave Young
On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > While CRASH_MAX_RANGES (== 16) seems to be good enough, fixed-number > array is not a good idea in general. > > In this patch, size of crash_mem buffer is calculated as before and > the buffer is now dynamically allocated. This change also allows

Re: [PATCH 2/7] kexec_file,x86,powerpc: factor out kexec_file_ops functions

2018-03-01 Thread AKASHI Takahiro
On Fri, Mar 02, 2018 at 01:04:26PM +0800, Dave Young wrote: > On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > > As arch_kexec_kernel_image_{probe,load}(), > > arch_kimage_file_post_load_cleanup() and arch_kexec_kernel_verify_sig() > > are almost duplicated among architectures, they can be

Re: [PATCH 4/7] x86: kexec_file: remove X86_64 dependency from prepare_elf64_headers()

2018-03-01 Thread Dave Young
On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > The code guarded by CONFIG_X86_64 is necessary on some architectures > which have a dedicated kernel mapping outside of linear memory mapping. > (arm64 is among those.) > > In this patch, an additional argument, kernel_map, is added to enable/ >

Re: RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Baoquan He
On 03/01/18 at 01:05pm, Bjorn Helgaas wrote: > [+cc Joerg, David, iommu list] > > On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: > > Hi, > > > > We are seeing IOMMU faults when booting the kdump kernel on ARM64. > > > > [7.220162] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x02

Re: RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 02:19:09PM -0500, Sinan Kaya wrote: > On 3/1/2018 2:05 PM, Bjorn Helgaas wrote: > > On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: > >> Hi, > >> > >> We are seeing IOMMU faults when booting the kdump kernel on ARM64. > >> > >> [7.220162] arm-smmu-v3

Re: RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Sinan Kaya
On 3/1/2018 2:05 PM, Bjorn Helgaas wrote: > [+cc Joerg, David, iommu list] > > On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: >> Hi, >> >> We are seeing IOMMU faults when booting the kdump kernel on ARM64. >> >> [7.220162] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x02 received: >> [

Re: RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Bjorn Helgaas
[+cc Joerg, David, iommu list] On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: > Hi, > > We are seeing IOMMU faults when booting the kdump kernel on ARM64. > > [7.220162] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x02 received: > [7.226123] arm-smmu-v3 arm-smmu-v3.0.auto:

RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Sinan Kaya
Hi, We are seeing IOMMU faults when booting the kdump kernel on ARM64. [7.220162] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x02 received: [7.226123] arm-smmu-v3 arm-smmu-v3.0.auto:0x0102 [7.232023] arm-smmu-v3 arm-smmu-v3.0.auto:0x [

Re: [PATCH 10/11] kexec_file: Allow archs to set purgatory load address

2018-03-01 Thread kbuild test robot
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 05/11] kexec_file: Use read-only sections in arch_kexec_apply_relocations*

2018-03-01 Thread kbuild test robot
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 10/11] kexec_file: Allow archs to set purgatory load address

2018-03-01 Thread kbuild test robot
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: