From e94faf557e5ef14cdd2e3cb9d67d1716ded7d6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20=22accek=22=20Aceda=C5=84ski?= Date: Thu, 26 Feb 2026 14:10:23 +0100 Subject: [PATCH] x86/early_tpm_extend: issue COMMAND_READY after successful read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per "TCG PC Client Specific TPM Interface Specification (TIS), Fig. 3 (State Transition Diagram)" one needs to first issue COMMAND_READY after reading the response, to move from "Command Completion" to "Idle". And then before issuing the next command, another COMMAND_READY is needed to move to "Ready" state. Some TPM chips do not require it, because specification allows to automatically move from "Idle" to "Ready" and that's why the code worked on some platforms. Without the fix we get crash in MLE at [1] at second and subsequent call. [1] https://github.com/TrenchBoot/linux/blob/040f882a9605f39552e70b090ab88716a3cebc66/arch/x86/boot/compressed/sl_main.c#L382 Signed-off-by: Szymon "accek" AcedaƄski --- arch/x86/boot/compressed/early_tpm_extend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/boot/compressed/early_tpm_extend.c b/arch/x86/boot/compressed/early_tpm_extend.c index 7cfdb7969878..fd20851427c3 100644 --- a/arch/x86/boot/compressed/early_tpm_extend.c +++ b/arch/x86/boot/compressed/early_tpm_extend.c @@ -321,6 +321,7 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, int count) goto out; } + __tis_cancel(chip); return size; out: __tis_cancel(chip);