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]
Date:   Wed, 5 Jun 2019 07:52:19 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc:     Jethro Beekman <jethro@...tanix.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "dave.hansen@...el.com" <dave.hansen@...el.com>,
        "nhorman@...hat.com" <nhorman@...hat.com>,
        "npmccallum@...hat.com" <npmccallum@...hat.com>,
        "serge.ayoun@...el.com" <serge.ayoun@...el.com>,
        "shay.katz-zamir@...el.com" <shay.katz-zamir@...el.com>,
        "haitao.huang@...el.com" <haitao.huang@...el.com>,
        "andriy.shevchenko@...ux.intel.com" 
        <andriy.shevchenko@...ux.intel.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "kai.svahn@...el.com" <kai.svahn@...el.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "josh@...htriplett.org" <josh@...htriplett.org>,
        "luto@...nel.org" <luto@...nel.org>,
        "kai.huang@...el.com" <kai.huang@...el.com>,
        "rientjes@...gle.com" <rientjes@...gle.com>
Subject: Re: [PATCH v20 15/28] x86/sgx: Add the Linux SGX Enclave Driver

On Wed, Jun 05, 2019 at 05:29:08PM +0300, Jarkko Sakkinen wrote:
> On Tue, Jun 04, 2019 at 01:12:32PM -0700, Sean Christopherson wrote:
> > On Tue, Apr 23, 2019 at 05:26:53PM -0700, Sean Christopherson wrote:
> > > On Tue, Apr 23, 2019 at 11:29:24PM +0000, Jethro Beekman wrote:
> > > > On 2019-04-22 14:58, Sean Christopherson wrote:
> > > > >Where do we stand on removing the ACPI and platform_driver dependencies?
> > > > >Can we get rid of them sooner rather than later?
> > > > 
> > > > You know my position on this...
> > > > https://www.spinics.net/lists/linux-sgx/msg00624.html . I don't really have
> > > > any new arguments.
> > > > 
> > > > Considering the amount of planned changes for the driver post-merge, I think
> > > > it's crucial that the driver part can be swapped out with alternative
> > > > implementations.
> > > 
> > > This gets far outside of my area of expertise as I think this is more of
> > > a policy question as opposed to a technical question, e.g. do we export
> > > function simply to allow out-of-tree alternatives.
> > > 
> > > > >Now that the core SGX code is approaching stability, I'd like to start
> > > > >sending RFCs for the EPC virtualization and KVM bits to hash out that side
> > > > >of things.  The ACPI crud is the last chunk of code that would require
> > > > >non-trivial changes to the core SGX code for the proposed virtualization
> > > > >implementation.  I'd strongly prefer to get it out of the way before
> > > > >sending the KVM RFCs.
> > > > 
> > > > What kind of changes? Wouldn't KVM just be another consumer of the same API
> > > > used by the driver?
> > > 
> > > Nope, userspace "only" needs to be able to mmap() arbitrary chunks of EPC.
> > > Except for EPC management, which is already in built into the kernel, the
> > > EPC virtualization code has effectively zero overlap with the driver.  Of
> > > course this is all technically speculative since none of this is upstream...
> > 
> > Jarkko, can you weigh in with your thoughts on the ACPI stuff?
> 
> If there is LKM, then it is required (for loading the LKM).
>
> I think we should see how the access control gets implemented first and
> see what constraints it introduces. It might help with to make the right
> decision whether to allow LKM or not.

At this point I don't see the access control stuff impacting the LKM
decision.

Irrespetive of the access control thing, there are (at least) two issues
with using ACPI to probe the driver:

  - ACPI probing breaks if there are multiple device, i.e. when KVM adds
    a raw EPC device.  We could do something like probe the driver via
    ACPI but manually load the raw EPC device from core SGX code, but IMO
    taking that approach should be a concious decision.

  - ACPI probing means core SGX will consume resources for EPC management
    even if there is no end consumer, e.g. the driver refuses to load due
    to lack of FLC support.

It would be very helpful for us to make a decision about LKM support
sooner rather than later, e.g. to start reworking the core code now and so
that I can send RFCs for KVM support.  IMO we're just delaying the
inevitable and slowing down upstreaming in the process.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ