Re: [PATCH 8/10] kdump: x86_64 save cpu registers upon crash

From: Eric W. Biederman
Date: Fri Nov 18 2005 - 16:52:48 EST



> diff -puN arch/x86_64/kernel/crash.c~x86_64-save-cpu-registers-upon-crash
> arch/x86_64/kernel/crash.c
> ---
> linux-2.6.15-rc1-1M-dynamic/arch/x86_64/kernel/crash.c~x86_64-save-cpu-registers-upon-crash

> #ifdef CONFIG_SMP
> static atomic_t waiting_for_crash_ipi;
>
> @@ -38,6 +106,7 @@ static int crash_nmi_callback(struct pt_
> return 1;
> local_irq_disable();
>
> + crash_save_this_cpu(regs, cpu);
> disable_local_APIC();
> atomic_dec(&waiting_for_crash_ipi);
> /* Assume hlt works */
> @@ -113,4 +182,5 @@ void machine_crash_shutdown(struct pt_re
> disable_IO_APIC();
> #endif
>
> + crash_save_self(regs);
> }

Where did this disable_local_APIC and disable_IO_APIC on x86_64 come
from? I know we had it on x86 but that was supposed to be a stop gap
until we have the real fix. Now I know it needs a little more
debugging but the real fix has been written. Putting it there on
x86_64 makes the code less reliable and it allows things to start
depending on it.

Please don't saving of the apics to x86_64 propagate this to x86_64.

The rest of the patch looks fine fairly sane, although from a purely
paranoid perspective I can see a few things I would need to look
at more to be certain they are safe.

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/