]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vmcore: check if vmcore objects satify mmap()'s page-size boundary requirement
authorHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Wed, 20 Mar 2013 04:08:38 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:23:30 +0000 (15:23 +1100)
commit333775f849bb1ae89df2c9fc8a8715e1ed2a3627
tree07c08fefbf9b39a1b750b305fc63f595336a30c7
parentc3ceb412b276587222bb679801a1b9895f801434
vmcore: check if vmcore objects satify mmap()'s page-size boundary requirement

If there's some vmcore object that doesn't satisfy page-size boundary
requirement, remap_pfn_range() fails to remap it to user-space.

Objects that possibly don't satisfy the requirement are ELF note segments
only.  The memory chunks corresponding to PT_LOAD entries are guaranteed
to satisfy page-size boundary requirement by the copy from old memory to
buffer in 2nd kernel done in later patch.

This patch doesn't copy each note segment into the 2nd kernel since they
amount to so large in total if there are multiple CPUs.  For example,
current maximum number of CPUs in x86_64 is 5120, where note segments
exceed 1MB with NT_PRSTATUS only.

Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/vmcore.c