lkml.org 
[lkml]   [2013]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 06/21] vmcore: round up buffer size of ELF headers by PAGE_SIZE
HATAYAMA Daisuke <d.hatayama@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


\
 
 \ /
  Last update: 2013-03-19 23:21    [W:0.365 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site