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: <20171128215513.qp2bs6462eq4pkz4@linux.intel.com>
Date:   Tue, 28 Nov 2017 23:55:13 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Sean Christopherson <sean.j.christopherson@...el.com>
Cc:     platform-driver-x86@...r.kernel.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...e.de>,
        Janakarajan Natarajan <Janakarajan.Natarajan@....com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Kyle Huey <me@...ehuey.com>,
        Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
        Piotr Luc <piotr.luc@...el.com>,
        Grzegorz Andrejczuk <grzegorz.andrejczuk@...el.com>
Subject: Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

On Tue, Nov 28, 2017 at 01:33:14PM -0800, Sean Christopherson wrote:
> On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote:
> > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote:
> > > 
> > > > 
> > > > So, maybe something like this?
> > > > 
> > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable
> > > >     if and only if SGX_LC is set in the IA32_FEATURE_CONTROL MSR and the
> > > >     IA32_FEATURE_CONTROL MSR is locked, otherwise they are read-only.
> > > > 
> > > >     For example, firmware can allow the OS to change the launch enclave
> > > >     root key by setting IA32_FEATURE_CONTROL.SGX_LC, and thus give the
> > > >     OS complete control over the enclaves it runs.  Alternatively,
> > > >     firmware can clear IA32_FEATURE_CONTROL.SGX_LC to lock down the root
> > > >     key and restrict the OS to running enclaves signed with the root key
> > > >     or whitelisted/trusted by a launch enclave (which must be signed with
> > > >     the root key).
> > > > 
> > > >     [1] SGX related bits in IA32_FEATURE_CONTROL cannot be set until SGX
> > > >         is activated, e.g. by firmware.  SGX activation is triggered by
> > > >         setting bit 0 in MSR 0x7a.  Until SGX is activated, the LE hash
> > > >         MSRs are writable, e.g. to allow firmware to lock down the LE
> > > >         root key with a non-Intel value.
> > > Thanks I'll use this as a basis and move most of the crappy commit
> > > message to the commit (with some editing) that defines the MSRs.
> > Not sure after all if I'm following this.
> > 
> > IA32_FEATURE_CONTROL[17] contols whether the MSRs are writable or not
> > after the feature control MSR is locked. SGX_LC means just that the
> > CPU supports the launch configuration.
> > 
> > /Jarkko
> 
> My comments were referring to improving the commit message for defining
> IA32_FEATURE_CONTROL.SGX_LC, i.e. bit 17, not the CPUID bit.

My bad but SGX_LC is referring here to the CPUID bit.

In SGX chapters there is no specific name for IA32_FEATURE_CONTROL[17].
I would call it something else than SGX_LC. Maybe SGX_LC_WRITABLE.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ