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: <e509c6c1e3644861edafb18e4045b813f9f344b3.camel@intel.com>
Date:   Tue, 02 Mar 2021 00:28:27 +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:53 +0100, Borislav Petkov wrote:
> On Mon, Mar 01, 2021 at 11:40:02PM +1300, Kai Huang wrote:
> > SGX2 means "Enclave Dynamic Memory Management", which supports dynamically
> > adding/removing EPC pages, plus changing page permission, after enclave is
> > initialized. So it allows enclave author to write enclave in more flexible way, and
> > also utilize EPC resource more efficiently.
> 
> So how is the enclave author going to use "sgx2" in /proc/cpuinfo? Query
> it to know whether it can start adding/removing EPC pages or is this
> going to be used by scripts?

I think some script can utilize /proc/cpuinfo. For instance, admin can have
automation tool/script to deploy enclave (with sgx2) apps, and that script can check
whether platform supports sgx2 or not, before it can deploy those enclave apps. Or
enclave author may just want to check /proc/cpuinfo to know whether the machine can
be used for testing sgx2 enclave or not.

However this is just my 2 cents.

> 
> > Yes I can add "why" into commit message, but isn't the comment after X86_FEATURE_SGX2
> > enough? I think people who are interested in SGX will know what SGX2 is and why SGX2
> > is useful.
> 
> The point is, the commit message should say how this flag in
> /proc/cpuinfo is going to be used - not what people interested in sgx
> might and might not know.
> 
> /proc/cpuinfo is user-visible ABI - you can't add stuff to it just because.
> 

Thanks for the explaining. Will do.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ