Commit cd026ca2 authored by Jia Zhang's avatar Jia Zhang Committed by Ingo Molnar

x86/mm/kcore: Add vsyscall page to /proc/kcore conditionally

The vsyscall page should be visible only if vsyscall=emulate/native when dumping /proc/kcore.
Signed-off-by: default avatarJia Zhang <zhang.jia@linux.alibaba.com>
Reviewed-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: jolsa@redhat.com
Link: http://lkml.kernel.org/r/1518446694-21124-3-git-send-email-zhang.jia@linux.alibaba.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 595dd46e
...@@ -1193,6 +1193,7 @@ void __init mem_init(void) ...@@ -1193,6 +1193,7 @@ void __init mem_init(void)
register_page_bootmem_info(); register_page_bootmem_info();
/* Register memory areas for /proc/kcore */ /* Register memory areas for /proc/kcore */
if (get_gate_vma(&init_mm))
kclist_add(&kcore_vsyscall, (void *)VSYSCALL_ADDR, PAGE_SIZE, KCORE_USER); kclist_add(&kcore_vsyscall, (void *)VSYSCALL_ADDR, PAGE_SIZE, KCORE_USER);
mem_init_print_info(NULL); mem_init_print_info(NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment