lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-3db3eb285259ac129f7aec6b814b3e9f6c1b372b@git.kernel.org>
Date:   Fri, 27 Apr 2018 08:09:44 -0700
From:   tip-bot for Petr Tesarik <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     ptesarik@...e.cz, thomas.lendacky@....com,
        boris.ostrovsky@...cle.com, mpatocka@...hat.com,
        tglx@...utronix.de, jgross@...e.com, luto@...nel.org,
        ptesarik@...e.com, linux-kernel@...r.kernel.org,
        douly.fnst@...fujitsu.com, mingo@...nel.org, jdelvare@...e.de,
        hpa@...or.com, bp@...e.de
Subject: [tip:x86/urgent] x86/setup: Do not reserve a crash kernel region if
 booted on Xen PV

Commit-ID:  3db3eb285259ac129f7aec6b814b3e9f6c1b372b
Gitweb:     https://git.kernel.org/tip/3db3eb285259ac129f7aec6b814b3e9f6c1b372b
Author:     Petr Tesarik <ptesarik@...e.cz>
AuthorDate: Wed, 25 Apr 2018 12:08:35 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 27 Apr 2018 17:06:28 +0200

x86/setup: Do not reserve a crash kernel region if booted on Xen PV

Xen PV domains cannot shut down and start a crash kernel. Instead,
the crashing kernel makes a SCHEDOP_shutdown hypercall with the
reason code SHUTDOWN_crash, cf. xen_crash_shutdown() machine op in
arch/x86/xen/enlighten_pv.c.

A crash kernel reservation is merely a waste of RAM in this case. It
may also confuse users of kexec_load(2) and/or kexec_file_load(2).
When flags include KEXEC_ON_CRASH or KEXEC_FILE_ON_CRASH,
respectively, these syscalls return success, which is technically
correct, but the crash kexec image will never be actually used.

Signed-off-by: Petr Tesarik <ptesarik@...e.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Juergen Gross <jgross@...e.com>
Cc: Tom Lendacky <thomas.lendacky@....com>
Cc: Dou Liyang <douly.fnst@...fujitsu.com>
Cc: Mikulas Patocka <mpatocka@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: xen-devel@...ts.xenproject.org
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: Borislav Petkov <bp@...e.de>
Cc: Jean Delvare <jdelvare@...e.de>
Link: https://lkml.kernel.org/r/20180425120835.23cef60c@ezekiel.suse.cz

---
 arch/x86/kernel/setup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 6285697b6e56..5c623dfe39d1 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -50,6 +50,7 @@
 #include <linux/init_ohci1394_dma.h>
 #include <linux/kvm_para.h>
 #include <linux/dma-contiguous.h>
+#include <xen/xen.h>
 
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -534,6 +535,11 @@ static void __init reserve_crashkernel(void)
 		high = true;
 	}
 
+	if (xen_pv_domain()) {
+		pr_info("Ignoring crashkernel for a Xen PV domain\n");
+		return;
+	}
+
 	/* 0 means: find the address automatically */
 	if (crash_base <= 0) {
 		/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ