[patch v3 6/8] s390: Do first kdump checksum test before really starting kdump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Holzheu <holzheu@xxxxxxxxxxxxxxxxxx>

With this patch first the kdump checksums in purgatory are verified (with
start_kdump(0)) before kdump is started. This allows us to do the shutdown
actions defined under /sys/firmware as recovery action in case kdump is
overwritten. The main use case is to define stand-alone dump as recovery
action.

We have to split the purgatory function into "checksum test" and "real
execution", because we have to switch to the IPL CPU when we execute kdump.
After the switch it is not possible to return from the called function.

Signed-off-by: Michael Holzheu <holzheu@xxxxxxxxxxxxxxxxxx>
---
 arch/s390/kernel/machine_kexec.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -325,8 +325,16 @@ void machine_kexec(struct kimage *image)
 {
 	tracer_disable();
 #ifdef CONFIG_CRASH_DUMP
-	if (image->type == KEXEC_TYPE_CRASH)
+	if (image->type == KEXEC_TYPE_CRASH) {
+		int (*start_kdump)(int) = (void *)image->start;
+		int rc;
+		__arch_local_irq_stnsm(0xfb); /* disable DAT */
+		rc = start_kdump(0);
+		__arch_local_irq_stosm(0x04); /* enable DAT */
+		if (rc)
+			return;
 		smp_switch_to_ipl_cpu(__machine_kdump, image);
+	}
 #endif
 	smp_send_stop();
 	smp_switch_to_ipl_cpu(__machine_kexec, image);

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux