[PATCH v3 06/21] vmcore: round up buffer size of ELF headers by PAGE_SIZE
Eric W. Biederman
ebiederm at xmission.com
Tue Mar 19 18:07:47 EDT 2013
HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com> writes:
> To satisfy mmap() page-size boundary requirement, round up buffer size
> of ELF headers by PAGE_SIZE. The resulting value becomes offset of ELF
> note segments and it's assigned in unique PT_NOTE program header
> entry.
Ok. That is just silly. You can use a single buffer for the ELF header,
the program header and the notes. It just requires a bit of counting
ahead of time.
The ELF header itself is small, and so are the program headers,
especially if you only have one PT_NOTE segment. The only thing that
possibly gets big is the note segment, and then that only happens if you
have a lot of cpus.
Since there are entirely local constructs it seems extremely silly,
wasteful and complicated to place each logical part in a separately
mmapable buffer instead of placing them in the same mmapable buffer.
Eric
More information about the kexec
mailing list