[PATCH v2 07/20] vmcore: copy non page-size aligned head and tail pages in 2nd kernel
HATAYAMA Daisuke
d.hatayama at jp.fujitsu.com
Sun Mar 10 20:27:19 EDT 2013
From: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>
Subject: Re: [PATCH v2 07/20] vmcore: copy non page-size aligned head and tail pages in 2nd kernel
Date: Sun, 10 Mar 2013 14:16:51 +0800
> 于 2013年03月02日 16:36, HATAYAMA Daisuke 写道:
<cut>
>> /* Update the program header offset. */
>> phdr_ptr->p_offset = vmcore_off;
>> - vmcore_off = vmcore_off + phdr_ptr->p_memsz;
>> + vmcore_off +=roundup(end,PAGE_SIZE)-rounddown(start,PAGE_SIZE);
>
> Here the code changes phdr_ptr->p_offset to a new page-size aligned offset.
> But it seems the phdr_ptr->p_paddr is still the non page-size aligned
> physical address? Does the mismatch of a PT_LOAD segment and the physical
> memory occur?
>
> Or, later in makedumpfile, it will check the phdr_ptr->paddr to see if it
> is page-size aligned and also phdr_ptr->p_memsz to get the real memory size,
> not including padding?
>
No, it doesn't happen. p_offset is made page-size aligned for
requirement to user-space linear-address vs file offset. The
requirement for physical address is handled internally in vmcore_list,
which is transparent to to user-space.
Thanks.
HATAYAMA, Daisuke
More information about the kexec
mailing list