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: <1e0d8039-5721-7172-877f-e3b0bbf216d2@amd.com>
Date: Mon, 4 Nov 2024 09:03:38 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
 Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Dave Hansen <dave.hansen@...ux.intel.com>,
 Michael Roth <michael.roth@....com>, Ashish Kalra <ashish.kalra@....com>,
 Nikunj A Dadhania <nikunj@....com>, Neeraj Upadhyay <Neeraj.Upadhyay@....com>
Subject: Re: [PATCH v5 5/8] x86/sev: Map only the RMP table entries instead of
 the full RMP range

On 11/4/24 00:28, Borislav Petkov wrote:
> On Mon, Oct 28, 2024 at 02:32:40PM -0500, Tom Lendacky wrote:
>> @@ -224,7 +246,14 @@ static int __init snp_rmptable_init(void)
>>  	if (val & MSR_AMD64_SYSCFG_SNP_EN)
>>  		goto skip_enable;
>>  
>> -	memset(rmptable_start, 0, probed_rmp_size);
>> +	/* Zero out the RMP bookkeeping area */
>> +	if (!init_rmptable_bookkeeping()) {
> 
> So let's call it what it is then:
> 
> diff --git a/arch/x86/virt/svm/sev.c b/arch/x86/virt/svm/sev.c
> index 5871c924c0b2..8145a7b14fa2 100644
> --- a/arch/x86/virt/svm/sev.c
> +++ b/arch/x86/virt/svm/sev.c
> @@ -173,7 +173,7 @@ void __init snp_fixup_e820_tables(void)
>  	__snp_fixup_e820_tables(probed_rmp_base + probed_rmp_size);
>  }
>  
> -static bool __init init_rmptable_bookkeeping(void)
> +static bool __init clear_rmptable_bookkeeping(void)

Sure.

Thanks,
Tom

>  {
>  	void *bk;
>  
> @@ -246,8 +246,7 @@ static int __init snp_rmptable_init(void)
>  	if (val & MSR_AMD64_SYSCFG_SNP_EN)
>  		goto skip_enable;
>  
> -	/* Zero out the RMP bookkeeping area */
> -	if (!init_rmptable_bookkeeping()) {
> +	if (!clear_rmptable_bookkeeping()) {
>  		memunmap(rmptable_start);
>  		goto nosnp;
>  	}
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ