Re: /proc/vmcore mmap() failure issue

From: H. Peter Anvin
Date: Wed Nov 13 2013 - 18:09:06 EST


On 11/13/2013 03:00 PM, Vivek Goyal wrote:
> I think it should be easy to truncate ELF headers in kexec-tools too when
> we are preparing elf headers. I am not sure if it is right thing to do or
> not. If some entry is showing up in /proc/iomem as RAM, then kexec-tools
> need to believe that it is a possibility that kernel is using that pfn and
> that pfn needs to be dumped out in vmcore. IMHO, kernel should fix this
> issue.

The kernel will never use a fractional page, so that is not an issue.

> Secondly, I am writing in-kernel kexec support too and I prepare ELF
> headers there too. And I am facing the same problem there too. So if
> we truncate partial pages in e820 both kexec-tools and in kernel kexec
> implementation don't have to do anything.

I'm mostly worried about truncation upon truncation causing problems.
As long as the trimming is done once and with proper consideration for
abutting regions, I guess I'm okay with it, although it feels wrong to me.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/