From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Tom Lendacky" <thomas.lendacky@amd.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
stable@vger.kernel.org, "Kevin Hui" <kevinhui@meta.com>
Subject: Re: [PATCH] x86/boot/sev: Move SEV decompressor variables into the .data section
Date: Wed, 04 Feb 2026 16:54:23 +0100 [thread overview]
Message-ID: <4dfe2339-7899-4469-8957-646d8195b4a4@app.fastmail.com> (raw)
In-Reply-To: <5648b7de5b0a5d0dfef3785f9582b718678c6448.1770217260.git.thomas.lendacky@amd.com>
On Wed, 4 Feb 2026, at 16:01, Tom Lendacky wrote:
> As part of the work to remove the dependency on calling into the
> decompressor code (startup_64()) for a UEFI boot, a call to rmpadjust()
> was removed from sev_enable() in favor of checking the value of the
> snp_vmpl variable. When booting through a non-UEFI path and calling
> startup_64(), the call to sev_enable() is performed before the BSS section
> is zeroed. With the removal of the rmpadjust() call and the corresponding
> check of the return code, the snp_vmpl variable is checked. Since the
> kernel is running at VMPL0, the snp_vmpl variable will not have been set
> and should be the default value of 0. However, since the call occurs
> before the BSS is zeroed, the snp_vmpl variable may not actually be zero,
> which will cause the guest boot to fail.
>
> Since the decompressor relocates itself, the BSS would need to be cleared
> both before and after the relocation, but this would, in effect, cause all
> of the changes to BSS variables before relocation to be lost after
> relocation.
>
> Instead, move the snp_vmpl variable into the .data section so that it is
> initialized and the value made safe during relocation. As a pre-caution
> against future changes, move other SEV-related decompressor variables into
> the .data section, too.
>
> Fixes: 68a501d7fd82 ("x86/boot: Drop redundant RMPADJUST in SEV SVSM
> presence check")
> Cc: stable@vger.kernel.org
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Tested-by: Kevin Hui <kevinhui@meta.com>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
next prev parent reply other threads:[~2026-02-04 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 15:01 Tom Lendacky
2026-02-04 15:54 ` Ard Biesheuvel [this message]
2026-02-26 19:16 ` Changyuan Lyu
2026-02-26 19:22 ` Borislav Petkov
2026-02-26 19:29 ` Changyuan Lyu
2026-02-26 19:38 ` Borislav Petkov
2026-02-27 20:55 ` 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=4dfe2339-7899-4469-8957-646d8195b4a4@app.fastmail.com \
--to=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kevinhui@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.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 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®