[PATCH] kexec: extend KCORE_ELF_HEADERS_SIZE for large memory

Simon Horman horms at verge.net.au
Mon Aug 23 21:22:49 EDT 2010


On Mon, Aug 23, 2010 at 04:18:05PM -0500, Cliff Wickman wrote:
> 
> A customer has seen the kexec command exhaust its buffer for the ELF headers
> from /proc/kcore.  It found 147 program headers, which requires a buffer of
> over 8k.
> (This overflow was on an SGI UV with an extremely large memory, hence
>  many ram ranges.)
> The default buffer size of 4k is configured in KCORE_ELF_HEADERS_SIZE.
> 
> The easy solution would probably be to increase the buffer to 16k.
> That is room for 291 entries, on x86_64.
> 
> You might want to make the command dynamically enlarge the buffer when
> it is found to be too small, but I don't think this command's use of a
> little more memory is of concern.  So there is probably no reason to
> change the program logic in this area.

Thanks Cliff,

applied.




More information about the kexec mailing list