[PATCH] build_mem_phdrs(): check if p_paddr is invalid

Simon Horman horms at verge.net.au
Mon Mar 13 01:57:59 PDT 2017


On Mon, Mar 13, 2017 at 02:45:29PM +0800, Dave Young wrote:
> On 03/07/17 at 06:53am, Pratyush Anand wrote:
> > Hi Simon,
> > 
> > On Wednesday 01 March 2017 12:43 PM, Dave Young wrote:
> > > On 03/01/17 at 11:19am, Pratyush Anand wrote:
> > > > Currently, all the p_paddr of PT_LOAD headers are assigned to 0, which
> > > > is not correct and could be misleading, since 0 is a valid physical
> > > > address.
> > > > 
> > > > Upstream kernel commit "464920104bf7 /proc/kcore: update physical
> > > > address for kcore ram and text" fixed it and now invalid PT_LOAD is
> > > > assigned as -1.
> > > > 
> > > > kexec/arch/i386/crashdump-x86.c:get_kernel_vaddr_and_size() uses kcore
> > > > interface and so calls build_mem_phdrs() for kcore PT_LOAD headers.
> > > > 
> > > > This patch fixes build_mem_phdrs() to check if p_paddr is invalid.
> > 
> > Any comment on this?
> 
> Simon, ping, explain a bit about the background based on the patch log:
> 
> Although it is a kernel regression, the original p_addr = 0 assumption is
> wrong, it should be fixed in kernel instead of keep it to avoid
> kexec-tools breakage.
> 
> Since latest kernel already has the fix merged, kexec-tools will fail to
> load crash kernel now. 
> 
> Any opinion about this patch?

Sorry for letting this slip through the cracks.

The patch looks good to me and I have applied it.



More information about the kexec mailing list