]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vmcore: introduce mmap_vmcore()
authorHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Wed, 20 Mar 2013 04:08:39 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:23:30 +0000 (15:23 +1100)
commit3134a8d523b88c53a145828eb0559d04589f6c44
tree74f3e7c9acff5cada0b012b77ce5c0b2717ee5fb
parent0fd4204a81c0e632011a29ca5af9aeeb51461584
vmcore: introduce mmap_vmcore()

This patch introduces mmap_vmcore().

If flag MEM_TYPE_CURRENT_KERNEL is set, remapped is the buffer on the 2nd
kernel.  If not set, remapped is some area in old memory.

Neither writable nor executable mapping is permitted even with mprotect().
 Non-writable mapping is also requirement of remap_pfn_range() when
mapping linear pages on non-consequtive physical pages; see
is_cow_mapping().

On x86-32 PAE kernels, mmap() supports at most 16TB memory only.  This
limitation comes from the fact that the third argument of
remap_pfn_range(), pfn, is of 32-bit length on x86-32: unsigned long.

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