linux-stable/arch
Baoquan He 401721ecd1 kexec: export the value of phys_base instead of symbol address
Currently in x86_64, the symbol address of phys_base is exported to
vmcoreinfo.  Dave Anderson complained this is really useless for his
Crash implementation.  Because in user-space utility Crash and
Makedumpfile which exported vmcore information is mainly used for, value
of phys_base is needed to covert virtual address of exported kernel
symbol to physical address.  Especially init_level4_pgt, if we want to
access and go over the page table to look up a PA corresponding to VA,
firstly we need calculate

  page_dir = SYMBOL(init_level4_pgt) - __START_KERNEL_map + phys_base;

Now in Crash and Makedumpfile, we have to analyze the vmcore elf program
header to get value of phys_base.  As Dave said, it would be preferable
if it were readily availabl in vmcoreinfo rather than depending upon the
PT_LOAD semantics.

Hence in this patch change to export the value of phys_base instead of
its virtual address.

And people also complained that KERNEL_IMAGE_SIZE exporting is x86_64
only, should be moved into arch dependent function
arch_crash_save_vmcoreinfo.  Do the moving in this patch.

Link: http://lkml.kernel.org/r/1478568596-30060-2-git-send-email-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Thomas Garnier <thgarnie@google.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Xunlei Pang <xlpang@redhat.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Eugene Surovegin <surovegin@google.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
Cc: Dave Anderson <anderson@redhat.com>
Cc: Pratyush Anand <panand@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-14 16:04:07 -08:00
..
alpha Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:56:15 -08:00
arc Merge branch 'linus' into locking/core, to pick up fixes 2016-12-11 13:07:13 +01:00
arm xen: features and fixes for 4.10 rc0 2016-12-13 16:07:55 -08:00
arm64 arm64 updates for 4.10: 2016-12-13 16:39:21 -08:00
avr32 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
blackfin Char/Misc driver patches for 4.10-rc1 2016-12-13 12:11:01 -08:00
c6x locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
cris Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
frv Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
h8300 locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
hexagon locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
ia64 Merge branch 'akpm' (patches from Andrew) 2016-12-12 20:50:02 -08:00
m32r m32r: fix build warning 2016-12-12 18:55:06 -08:00
m68k Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
metag locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
microblaze Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 20:23:11 -08:00
mips Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
mn10300 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
nios2 Merge branch 'linus' into locking/core, to pick up fixes 2016-11-22 12:37:38 +01:00
openrisc Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
parisc Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
powerpc Small release, the most interesting stuff is x86 nested virt improvements. 2016-12-13 15:47:02 -08:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-12-13 16:33:33 -08:00
score locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
sh mm: remove the page size change check in tlb_remove_page 2016-12-12 18:55:07 -08:00
sparc Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:25:04 -08:00
tile Merge branch 'locking/urgent' into locking/core, to pick up dependent fixes 2016-12-02 11:13:44 +01:00
um mm: remove the page size change check in tlb_remove_page 2016-12-12 18:55:07 -08:00
unicore32 locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
x86 kexec: export the value of phys_base instead of symbol address 2016-12-14 16:04:07 -08:00
xtensa Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
.gitignore
Kconfig Minor changes to the gcc plugins: 2016-12-13 09:22:21 -08:00