From: "Aithal, Srikanth" <sraithal@amd.com>
To: Borislav Petkov <bp@alien8.de>, Ashish Kalra <Ashish.Kalra@amd.com>
Cc: tglx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org,
thomas.lendacky@amd.com, hpa@zytor.com, michael.roth@amd.com,
nikunj@amd.com, seanjc@google.com, ardb@kernel.org,
stable@vger.kernel.org, linux-kernel@vger.kernel.org,
kexec@lists.infradead.org, linux-coco@lists.linux.dev
Subject: Re: [PATCH v5] x86/sev: Fix making shared pages private during kdump
Date: Tue, 13 May 2025 17:32:55 +0530 [thread overview]
Message-ID: <c0af2efa-aea4-43aa-b1da-46ac4c50314b@amd.com> (raw)
In-Reply-To: <20250507094211.GAaBsq8zEJMAuffwmh@fat_crate.local>
On 5/7/2025 3:12 PM, Borislav Petkov wrote:
> On Tue, May 06, 2025 at 06:35:29PM +0000, Ashish Kalra wrote:
>> From: Ashish Kalra <ashish.kalra@amd.com>
>>
>> When the shared pages are being made private during kdump preparation
>> there are additional checks to handle shared GHCB pages.
>>
>> These additional checks include handling the case of GHCB page being
>> contained within a huge page.
>>
>> The check for handling the case of GHCB contained within a huge
>> page incorrectly skips a page just below the GHCB page from being
>> transitioned back to private during kdump preparation.
>>
>> This skipped page causes a 0x404 #VC exception when it is accessed
>> later while dumping guest memory during vmcore generation via kdump.
>>
>> Correct the range to be checked for GHCB contained in a huge page.
>> Also ensure that the skipped huge page containing the GHCB page is
>> transitioned back to private by applying the correct address mask
>> later when changing GHCBs to private at end of kdump preparation.
>>
>> Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on kexec")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
>> ---
>> arch/x86/coco/sev/core.c | 11 +++++++----
>> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> Ok, I've pushed both patches here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=tip-x86-urgent-sev
>
> Please have those who are affected by the issues test and report back.
>
> Thx.
>
I tested the failure scenario with the patch hosted in the referenced
Git tree [1]. The patch resolves the issue.
Tested-by: Srikanth Aithal <sraithal@amd.com>
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=tip-x86-urgent-sev
next prev parent reply other threads:[~2025-05-13 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 18:35 [PATCH v5] x86/sev: Fix making shared pages private during kdump Ashish Kalra
2025-05-07 9:42 ` Borislav Petkov
2025-05-13 12:02 ` Aithal, Srikanth [this message]
2025-05-07 13:58 ` Tom Lendacky
2025-05-13 18:07 ` [tip: x86/urgent] x86/sev: Make sure pages are not skipped " tip-bot2 for Ashish Kalra
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=c0af2efa-aea4-43aa-b1da-46ac4c50314b@amd.com \
--to=sraithal@amd.com \
--cc=Ashish.Kalra@amd.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kexec@lists.infradead.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=seanjc@google.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