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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Mar 2024 17:17:19 +0100
From: Vasant Karasulli <vsntk18@...il.com>
To: x86@...nel.org
Cc: joro@...tes.org,
	cfir@...gle.com,
	dan.j.williams@...el.com,
	dave.hansen@...ux.intel.com,
	ebiederm@...ssion.com,
	erdemaktas@...gle.com,
	hpa@...or.com,
	jgross@...e.com,
	jslaby@...e.cz,
	keescook@...omium.org,
	kexec@...ts.infradead.org,
	kvm@...r.kernel.org,
	linux-coco@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	luto@...nel.org,
	martin.b.radev@...il.com,
	mhiramat@...nel.org,
	mstunes@...are.com,
	nivedita@...m.mit.edu,
	peterz@...radead.org,
	rientjes@...gle.com,
	seanjc@...gle.com,
	stable@...r.kernel.org,
	thomas.lendacky@....com,
	virtualization@...ts.linux-foundation.org,
	Joerg Roedel <jroedel@...e.de>,
	Vasant Karasulli <vkarasulli@...e.de>
Subject: [PATCH v4 1/9] x86/kexec/64: Disable kexec when SEV-ES is active

From: Joerg Roedel <jroedel@...e.de>

SEV-ES needs special handling to support kexec. Disable it when SEV-ES
is active until support is implemented.

Signed-off-by: Joerg Roedel <jroedel@...e.de>
Signed-off-by: Vasant Karasulli <vkarasulli@...e.de>
---
 arch/x86/kernel/machine_kexec_64.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index bc0a5348b4a6..3671ea1a5045 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -267,11 +267,22 @@ static void load_segments(void)
 		);
 }

+static bool machine_kexec_supported(void)
+{
+	if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT))
+		return false;
+
+	return true;
+}
+
 int machine_kexec_prepare(struct kimage *image)
 {
 	unsigned long start_pgtable;
 	int result;

+	if (!machine_kexec_supported())
+		return -ENOSYS;
+
 	/* Calculate the offsets */
 	start_pgtable = page_to_pfn(image->control_code_page) << PAGE_SHIFT;

--
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ