kcore: register vmalloc area in generic way
For /proc/kcore, vmalloc areas are registered per arch. But, all of them registers same range of [VMALLOC_START...VMALLOC_END) This patch unifies them. By this. archs which have no kclist_add() hooks can see vmalloc area correctly. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c30bb2a25f
commit
a0614da88b
@@ -372,9 +372,14 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
|
||||
return acc;
|
||||
}
|
||||
|
||||
static struct kcore_list kcore_vmalloc;
|
||||
|
||||
static int __init proc_kcore_init(void)
|
||||
{
|
||||
proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &proc_kcore_operations);
|
||||
|
||||
kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
|
||||
VMALLOC_END - VMALLOC_START, KCORE_VMALLOC);
|
||||
return 0;
|
||||
}
|
||||
module_init(proc_kcore_init);
|
||||
|
Reference in New Issue
Block a user