lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0af2efa-aea4-43aa-b1da-46ac4c50314b@amd.com>
Date: Tue, 13 May 2025 17:32:55 +0530
From: "Aithal, Srikanth" <sraithal@....com>
To: Borislav Petkov <bp@...en8.de>, Ashish Kalra <Ashish.Kalra@....com>
Cc: tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
 x86@...nel.org, thomas.lendacky@....com, hpa@...or.com,
 michael.roth@....com, nikunj@....com, seanjc@...gle.com, ardb@...nel.org,
 stable@...r.kernel.org, linux-kernel@...r.kernel.org,
 kexec@...ts.infradead.org, linux-coco@...ts.linux.dev
Subject: Re: [PATCH v5] x86/sev: Fix making shared pages private during kdump

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@....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@...r.kernel.org
>> Signed-off-by: Ashish Kalra <ashish.kalra@....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@....com>

[1]: 
https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=tip-x86-urgent-sev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ