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: <20250402094736.GAZ-0HuG0uVznq5wX_@fat_crate.local>
Date: Wed, 2 Apr 2025 11:47:36 +0200
From: Borislav Petkov <bp@...en8.de>
To: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
	dave.hansen@...ux.intel.com, Thomas.Lendacky@....com,
	nikunj@....com, Santosh.Shukla@....com, Vasant.Hegde@....com,
	Suravee.Suthikulpanit@....com, David.Kaplan@....com, x86@...nel.org,
	hpa@...or.com, peterz@...radead.org, seanjc@...gle.com,
	pbonzini@...hat.com, kvm@...r.kernel.org,
	kirill.shutemov@...ux.intel.com, huibo.wang@....com,
	naveen.rao@....com
Subject: Re: [RFC v2 01/17] x86/apic: Add new driver for Secure AVIC

On Tue, Apr 01, 2025 at 10:42:17AM +0530, Neeraj Upadhyay wrote:
> > diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
> > index edc31615cb67..ecf86b8a6601 100644
> > --- a/arch/x86/include/asm/msr-index.h
> > +++ b/arch/x86/include/asm/msr-index.h
> > @@ -685,8 +685,14 @@
> >  #define MSR_AMD64_SNP_VMSA_REG_PROT	BIT_ULL(MSR_AMD64_SNP_VMSA_REG_PROT_BIT)
> >  #define MSR_AMD64_SNP_SMT_PROT_BIT	17
> >  #define MSR_AMD64_SNP_SMT_PROT		BIT_ULL(MSR_AMD64_SNP_SMT_PROT_BIT)
> > +
> >  #define MSR_AMD64_SNP_SECURE_AVIC_BIT	18
> > -#define MSR_AMD64_SNP_SECURE_AVIC 	BIT_ULL(MSR_AMD64_SNP_SECURE_AVIC_BIT)
> > +#ifdef CONFIG_AMD_SECURE_AVIC
> > +#define MSR_AMD64_SNP_SECURE_AVIC	BIT_ULL(MSR_AMD64_SNP_SECURE_AVIC_BIT)
> > +#else
> > +#define MSR_AMD64_SNP_SECURE_AVIC	0
> > +#endif
> > +
> 
> I missed this part. I think this does not work because if CONFIG_AMD_SECURE_AVIC
> is not enabled, MSR_AMD64_SNP_SECURE_AVIC bit becomes 0 in both SNP_FEATURES_IMPL_REQ
> and SNP_FEATURES_PRESENT.
> 
> So, snp_get_unsupported_features() won't report SECURE_AVIC feature as not being
> enabled in guest launched with SECURE_AVIC vmsa feature enabled. Thoughts?

Your formulations are killing me :-P

... won't report.. as not being enabled ... with feature enabled.

Double negation with a positive at the end.

So this translates to

"will report as enabled when enabled"

which doesn't make too much sense.

*IF* you have CONFIG_AMD_SECURE_AVIC disabled, then you don't have SAVIC
support and then SAVIC VMSA feature bit better be 0.

Or what do you mean?

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ