]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[S390] kdump: Add infrastructure for unmapping crashkernel memory
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Mon, 26 Sep 2011 14:42:50 +0000 (16:42 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 26 Sep 2011 14:42:47 +0000 (16:42 +0200)
commit3fa05c8df1631f82422df70377a88b8ba0896d5c
tree1bf22ece097cb65cdd484f37729da665e449f863
parente2018318c2e43833e3dc3f48adb0ac8f75a94c5c
[S390] kdump: Add infrastructure for unmapping crashkernel memory

This patch introduces a mechanism that allows architecture backends to
remove page tables for the crashkernel memory. This can protect the loaded
kdump kernel from being overwritten by broken kernel code.  Two new
functions crash_map_reserved_pages() and crash_unmap_reserved_pages() are
added that can be implemented by architecture code.  The
crash_map_reserved_pages() function is called before and
crash_unmap_reserved_pages() after the crashkernel segments are loaded.  The
functions are also called in crash_shrink_memory() to create/remove page
tables when the crashkernel memory size is reduced.

To support architectures that have large pages this patch also introduces
a new define KEXEC_CRASH_MEM_ALIGN. The crashkernel start and size must
always be aligned with KEXEC_CRASH_MEM_ALIGN.

Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
include/linux/kexec.h
kernel/kexec.c