All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kiryl Shutsemau <kas@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	 x86@kernel.org, Borislav Petkov <bp@alien8.de>,
	 "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Subject: Re: [PATCH v2 1/3] x86/tdx: Share tdx_panic() with the EFI stub
Date: Fri, 25 Sep 2026 12:44:44 +0100	[thread overview]
Message-ID: <arZeOczqtAPGqjnH@thinkstation> (raw)
In-Reply-To: <20260925075137.44298-6-ardb@kernel.org>

On Fri, Sep 25, 2026 at 09:51:39AM +0200, Ard Biesheuvel wrote:
> Move the implementation of tdx_panic() into the source file that is
> shared with the decompressor and the EFI stub.
> 
> Use memcpy() and strnlen() instead of strtomem_pad(), as the latter does
> not exist in the early boot code. Avoid fortify instrumentation in the
> decompressor/EFI stub by #define'ing __NO_FORTIFY before including
> tdx-shared.c
> 
> Note that __tdx_hypercall() may call __tdx_hypercall_failed() if the
> hypercall returns with an error (while it should never return to begin
> with). __tdx_hypercall_failed() calls the decompressor's error()
> routine, which prints a message and then loops forever.
> 
> When called from the EFI stub, this error() call may attempt to use port
> I/O to the default serial port rather than the TDX hypercalls which the
> decompressor uses normally to print diagnostics to the console, but this
> is fine: given that this situation only occurs after a catastrophic
> error, and a subsequent spurious return from tdx_panic(), whether
> error() uses port I/O or not is rather moot at that point, as long as it
> never returns.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

  reply	other threads:[~2026-09-25 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  7:51 [PATCH v2 0/3] Move memory acceptance x86 arch code into EFI stub Ard Biesheuvel
2026-09-25  7:51 ` [PATCH v2 1/3] x86/tdx: Share tdx_panic() with the " Ard Biesheuvel
2026-09-25 11:44   ` Kiryl Shutsemau [this message]
2026-09-25  7:51 ` [PATCH v2 2/3] x86/boot: Move unaccepted memory handling out of the decompressor Ard Biesheuvel
2026-09-25 11:59   ` Kiryl Shutsemau
2026-09-25  7:51 ` [PATCH v2 3/3] x86/boot: Drop unused implementation of panic() Ard Biesheuvel
2026-09-29  3:01 ` [PATCH v2 0/3] Move memory acceptance x86 arch code into EFI stub Borislav Petkov

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=arZeOczqtAPGqjnH@thinkstation \
    --to=kas@kernel.org \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.