The patch titled kexec: Avoid overwriting the current pgd: stubs has been removed from the -mm tree. Its filename is kexec-avoid-overwriting-the-current-pgd-v2-stubs.patch This patch was probably dropped from -mm because it has now been merged into a subsystem tree or into Linus's tree, or because it was folded into its parent patch in the -mm tree. ------------------------------------------------------ Subject: kexec: Avoid overwriting the current pgd: stubs From: Magnus Damm <magnus@xxxxxxxxxxxxx> This patchset updates the kexec code for i386 and x86_64 to avoid overwriting the current pgd. For most people is overwriting the current pgd is not a big problem. When kexec:ing into a new kernel that reinitializes and makes use of all memory we don't care about saving state. But overwriting the current pgd is not a good solution in the case of kdump (CONFIG_CRASH_DUMP) where we want to preserve as much state as possible when a crash occurs. This patch solves the overwriting issue. This patch: Add an architecture specific structure "struct kimage_arch" to struct kimage. This structure is filled in with members by the architecture specific patches followed by this one. Signed-off-by: Magnus Damm <magnus@xxxxxxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Andi Kleen <ak@xxxxxx> Cc: Haren Myneni <hbabu@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/asm-i386/kexec.h | 2 ++ include/asm-powerpc/kexec.h | 2 ++ include/asm-s390/kexec.h | 2 ++ include/asm-sh/kexec.h | 2 ++ include/asm-x86_64/kexec.h | 2 ++ include/linux/kexec.h | 2 ++ 6 files changed, 12 insertions(+) diff -puN include/asm-i386/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs include/asm-i386/kexec.h --- 25/include/asm-i386/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs Wed May 24 14:47:28 2006 +++ 25-akpm/include/asm-i386/kexec.h Wed May 24 14:47:47 2006 @@ -29,6 +29,8 @@ #define MAX_NOTE_BYTES 1024 +struct kimage_arch {}; + /* CPU does not save ss and esp on stack if execution is already * running in kernel mode at the time of NMI occurrence. This code * fixes it. diff -puN include/asm-powerpc/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs include/asm-powerpc/kexec.h --- 25/include/asm-powerpc/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs Wed May 24 14:47:28 2006 +++ 25-akpm/include/asm-powerpc/kexec.h Wed May 24 14:47:28 2006 @@ -109,6 +109,8 @@ static inline void crash_setup_regs(stru #define MAX_NOTE_BYTES 1024 +struct kimage_arch {}; + #ifdef __powerpc64__ extern void kexec_smp_wait(void); /* get and clear naca physid, wait for master to copy new code to 0 */ diff -puN include/asm-s390/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs include/asm-s390/kexec.h --- 25/include/asm-s390/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs Wed May 24 14:47:28 2006 +++ 25-akpm/include/asm-s390/kexec.h Wed May 24 14:47:28 2006 @@ -36,6 +36,8 @@ #define MAX_NOTE_BYTES 1024 +struct kimage_arch {}; + /* Provide a dummy definition to avoid build failures. */ static inline void crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs) { } diff -puN include/asm-sh/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs include/asm-sh/kexec.h --- 25/include/asm-sh/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs Wed May 24 14:47:28 2006 +++ 25-akpm/include/asm-sh/kexec.h Wed May 24 14:47:28 2006 @@ -25,6 +25,8 @@ #ifndef __ASSEMBLY__ +struct kimage_arch {}; + extern void machine_shutdown(void); extern void *crash_notes; diff -puN include/asm-x86_64/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs include/asm-x86_64/kexec.h --- 25/include/asm-x86_64/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs Wed May 24 14:47:28 2006 +++ 25-akpm/include/asm-x86_64/kexec.h Wed May 24 14:47:47 2006 @@ -29,6 +29,8 @@ #define MAX_NOTE_BYTES 1024 +struct kimage_arch {}; + /* * Saving the registers of the cpu on which panic occured in * crash_kexec to save a valid sp. The registers of other cpus diff -puN include/linux/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs include/linux/kexec.h --- 25/include/linux/kexec.h~kexec-avoid-overwriting-the-current-pgd-v2-stubs Wed May 24 14:47:28 2006 +++ 25-akpm/include/linux/kexec.h Wed May 24 14:47:28 2006 @@ -69,6 +69,8 @@ struct kimage { unsigned long start; struct page *control_code_page; + struct kimage_arch arch_data; + unsigned long nr_segments; struct kexec_segment segment[KEXEC_SEGMENT_MAX]; _ Patches currently in -mm which might be from magnus@xxxxxxxxxxxxx are kexec-avoid-overwriting-the-current-pgd-v2-stubs.patch kexec-avoid-overwriting-the-current-pgd-v2-i386.patch kexec-avoid-overwriting-the-current-pgd-v2-i386-tidy.patch kexec-avoid-overwriting-the-current-pgd-v2-x86_64.patch kexec-avoid-overwriting-the-current-pgd-v2-x86_64-tidy.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html