kexec: move vmcoreinfo out of the kernel's .bss section
authorXunlei Pang <xlpang@redhat.com>
Wed, 12 Jul 2017 21:33:14 +0000 (14:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Jul 2017 23:25:59 +0000 (16:25 -0700)
commit203e9e41219b4e7357104e525e91ac609fba2c6c
treef7b0b4235857f20c11bf15d2e582d57f9f29a872
parent112166f88cf83dd11486cf1818672d42b540865b
kexec: move vmcoreinfo out of the kernel's .bss section

As Eric said,
 "what we need to do is move the variable vmcoreinfo_note out of the
  kernel's .bss section. And modify the code to regenerate and keep this
  information in something like the control page.

  Definitely something like this needs a page all to itself, and ideally
  far away from any other kernel data structures. I clearly was not
  watching closely the data someone decided to keep this silly thing in
  the kernel's .bss section."

This patch allocates extra pages for these vmcoreinfo_XXX variables, one
advantage is that it enhances some safety of vmcoreinfo, because
vmcoreinfo now is kept far away from other kernel data structures.

Link: http://lkml.kernel.org/r/1493281021-20737-1-git-send-email-xlpang@redhat.com
Signed-off-by: Xunlei Pang <xlpang@redhat.com>
Tested-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Suggested-by: Eric Biederman <ebiederm@xmission.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Young <dyoung@redhat.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/kernel/machine_kexec.c
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/setup.c
arch/x86/kernel/crash.c
arch/x86/xen/mmu_pv.c
include/linux/crash_core.h
kernel/crash_core.c
kernel/ksysfs.c