From: Tony Camuso <tcamuso@redhat.com>
To: ning.sun@intel.com, tboot-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, rppt@kernel.org,
tglx@linutronix.de, mingo@kernel.org, bp@alien8.de,
michal.camacho.romero@linux.intel.com
Subject: [tboot-devel] [PATCH 1/1] Disable CET when calling tboot shutdown procedure.
Date: Thu, 13 Nov 2025 09:37:14 -0500 [thread overview]
Message-ID: <20251017073619.547993-1-michal.camacho.romero@linux.intel.com> (raw)
From: Michal Camacho Romero <michal.camacho.romero@linux.intel.com>
From: Mark Gross <mgross@linux.intel.com>
The tboot->shutdown_entry is effectively bios code and CET needs to be
disabled before calling it.
It resolves TBOOT shutdown failure bug, reported on the SLES (SUSE Linux
Enterprise Server) 16.0 OS. OS power off, called by the "init 0" command,
was failing, due to activated Intel Control-Flow Enforcement Technology
(CET).
Disabling CET has allowed to execute OS and TBOOT shutdown properly.
Closes: https://bugzilla.suse.com/show_bug.cgi?id=1247950
Signed-off-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Michal Camacho Romero <michal.camacho.romero@linux.intel.com>
Tested-by: Tony Camuso <tcamuso@redhat.com>
---
arch/x86/kernel/tboot.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index 4c1bcb6053fc..932c2c44e743 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -28,6 +28,7 @@
#include <asm/setup.h>
#include <asm/e820/api.h>
#include <asm/io.h>
+#include <asm/cpu.h>
#include "../realmode/rm/wakeup.h"
@@ -248,6 +249,10 @@ void tboot_shutdown(u32 shutdown_type)
switch_to_tboot_pt();
+ /*
+ * toggle off CET while we call shutdown_entry in bios
+ */
+ cet_disable();
shutdown = (void(*)(void))(unsigned long)tboot->shutdown_entry;
shutdown();
--
2.47.1
next reply other threads:[~2025-11-13 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 14:37 Tony Camuso [this message]
2025-11-25 0:34 ` Bagas Sanjaya
2025-12-10 18:10 ` Tony Camuso
2025-12-11 13:46 ` Tony Camuso
2026-01-12 17:31 ` Tony Camuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251017073619.547993-1-michal.camacho.romero@linux.intel.com \
--to=tcamuso@redhat.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.camacho.romero@linux.intel.com \
--cc=mingo@kernel.org \
--cc=ning.sun@intel.com \
--cc=rppt@kernel.org \
--cc=tboot-devel@lists.sourceforge.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®