lkml.org 
[lkml]   [2013]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 3/9] vmcore: treat memory chunks referenced by PT_LOAD program header entries in page-size boundary in vmcore_list
On Thu, 23 May 2013 14:25:13 +0900 HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> wrote:

> Treat memory chunks referenced by PT_LOAD program header entries in
> page-size boundary in vmcore_list. Formally, for each range [start,
> end], we set up the corresponding vmcore object in vmcore_list to
> [rounddown(start, PAGE_SIZE), roundup(end, PAGE_SIZE)].
>
> This change affects layout of /proc/vmcore.

Well, changing a userspace interface is generally unacceptable because
it can break existing userspace code.

If you think the risk is acceptable then please do explain why. In
great detail!

> The gaps generated by the
> rearrangement are newly made visible to applications as
> holes. Concretely, they are two ranges [rounddown(start, PAGE_SIZE),
> start] and [end, roundup(end, PAGE_SIZE)].
>
> Suppose variable m points at a vmcore object in vmcore_list, and
> variable phdr points at the program header of PT_LOAD type the
> variable m corresponds to. Then, pictorially:
>
> m->offset +---------------+
> | hole |
> phdr->p_offset = +---------------+
> m->offset + (paddr - start) | |\
> | kernel memory | phdr->p_memsz
> | |/
> +---------------+
> | hole |
> m->offset + m->size +---------------+
>
> where m->offset and m->offset + m->size are always page-size aligned.


\
 
 \ /
  Last update: 2013-05-24 00:41    [W:0.270 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site