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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fce1dd2abd42597bde7ae9496bde7b9596b2797.camel@intel.com>
Date:   Mon, 01 Mar 2021 23:19:15 +1300
From:   Kai Huang <kai.huang@...el.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     kvm@...r.kernel.org, x86@...nel.org, linux-sgx@...r.kernel.org,
        linux-kernel@...r.kernel.org, seanjc@...gle.com, jarkko@...nel.org,
        luto@...nel.org, dave.hansen@...el.com, rick.p.edgecombe@...el.com,
        haitao.huang@...el.com, pbonzini@...hat.com, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com
Subject: Re: [PATCH 02/25] x86/cpufeatures: Add SGX1 and SGX2 sub-features

On Mon, 2021-03-01 at 11:00 +0100, Borislav Petkov wrote:
> On Mon, Mar 01, 2021 at 10:44:29PM +1300, Kai Huang wrote:
> > From: Sean Christopherson <seanjc@...gle.com>
> > 
> > Add SGX1 and SGX2 feature flags, via CPUID.0x12.0x0.EAX, as scattered
> > features, since adding a new leaf for only two bits would be wasteful.
> > As part of virtualizing SGX, KVM will expose the SGX CPUID leafs to its
> > guest, and to do so correctly needs to query hardware and kernel support
> > for SGX1 and SGX2.
> > 
> > Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> > Acked-by: Dave Hansen <dave.hansen@...el.com>
> > Signed-off-by: Kai Huang <kai.huang@...el.com>
> > ---
> >  arch/x86/include/asm/cpufeatures.h | 2 ++
> >  arch/x86/kernel/cpu/cpuid-deps.c   | 2 ++
> >  arch/x86/kernel/cpu/scattered.c    | 2 ++
> >  3 files changed, 6 insertions(+)
> > 
> > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> > index cc96e26d69f7..9502c445a3e9 100644
> > --- a/arch/x86/include/asm/cpufeatures.h
> > +++ b/arch/x86/include/asm/cpufeatures.h
> > @@ -290,6 +290,8 @@
> >  #define X86_FEATURE_FENCE_SWAPGS_KERNEL	(11*32+ 5) /* "" LFENCE in kernel entry SWAPGS path */
> >  #define X86_FEATURE_SPLIT_LOCK_DETECT	(11*32+ 6) /* #AC for split lock */
> >  #define X86_FEATURE_PER_THREAD_MBA	(11*32+ 7) /* "" Per-thread Memory Bandwidth Allocation */
> > +#define X86_FEATURE_SGX1		(11*32+ 8) /* "" Basic SGX */
> > +#define X86_FEATURE_SGX2        	(11*32+ 9) /* SGX Enclave Dynamic Memory Management (EDMM) */
> 
> "sgx1" is not gonna show in /proc/cpuinfo but "sgx2" will. Because...?

There's already X86_FEATURE_SGX, which shows "sgx" in /proc/cpuinfo. Showing "sgx1"
doesn't add anything. "sgx2" is useful because it adds additional functionality.

Both Sean and Paolo suggested this. Please see below discussion:

https://www.spinics.net/lists/kvm/msg234533.html

> 
> Also, you send a patchset once a week - not after two days. Please limit
> your spamming.
> 

OK. Thanks for reminding.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ