[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181224115201.GA10971@linux.intel.com>
Date: Mon, 24 Dec 2018 13:52:01 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: Sean Christopherson <sean.j.christopherson@...el.com>,
Jethro Beekman <jethro@...tanix.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"x86@...nel.org" <x86@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
Josh Triplett <josh@...htriplett.org>,
Haitao Huang <haitao.huang@...ux.intel.com>,
"Dr . Greg Wettstein" <greg@...ellic.com>
Subject: Re: x86/sgx: uapi change proposal
On Sun, Dec 23, 2018 at 12:42:48PM -0800, Andy Lutomirski wrote:
> On Sun, Dec 23, 2018 at 4:52 AM Jarkko Sakkinen
> <jarkko.sakkinen@...ux.intel.com> wrote:
> >
> > On Sat, Dec 22, 2018 at 10:25:02AM +0200, Jarkko Sakkinen wrote:
> > > On Sat, Dec 22, 2018 at 10:16:49AM +0200, Jarkko Sakkinen wrote:
> > > > On Thu, Dec 20, 2018 at 12:32:04PM +0200, Jarkko Sakkinen wrote:
> > > > > On Wed, Dec 19, 2018 at 06:58:48PM -0800, Andy Lutomirski wrote:
> > > > > > Can one of you explain why SGX_ENCLAVE_CREATE is better than just
> > > > > > opening a new instance of /dev/sgx for each encalve?
> > > > >
> > > > > I think that fits better to the SCM_RIGHTS scenario i.e. you could send
> > > > > the enclav to a process that does not have necessarily have rights to
> > > > > /dev/sgx. Gives more robust environment to configure SGX.
> > > >
> > > > Sean, is this why you wanted enclave fd and anon inode and not just use
> > > > the address space of /dev/sgx? Just taking notes of all observations.
> > > > I'm not sure what your rationale was (maybe it was somewhere). This was
> > > > something I made up, and this one is wrong deduction. You can easily
> > > > get the same benefit with /dev/sgx associated fd representing the
> > > > enclave.
> > > >
> > > > This all means that for v19 I'm going without enclave fd involved with
> > > > fd to /dev/sgx representing the enclave. No anon inodes will be
> > > > involved.
> > >
> > > Based on these observations I updated the uapi.
> > >
> > > As far as I'm concerned there has to be a solution to do EPC mapping
> > > with a sequence:
> > >
> > > 1. Ping /dev/kvm to do something.
> > > 2. KVM asks SGX core to do something.
> > > 3. SGX core does something.
> > >
> > > I don't care what the something is exactly is, but KVM is the only sane
> > > place for KVM uapi. I would be surprised if KVM maintainers didn't agree
> > > that they don't want to sprinkle KVM uapi to random places in other
> > > subsystems.
> >
> > The one option to consider to do would be to have a device driver for
> > KVM if you really want this e.g. something like /dev/vsgx. With the
> > current knowledge I'm not yet sure why all could not be done just
> > through /dev/kvm.
> >
>
> That seems reasonable too. I don't really care about the path to the
> device node, but it does seem reasonable to me to have it be a
> separate node entirely from the normal enclave interface.
What is the core reason anyway that /dev/kvm is out of the question?
/Jarkko
Powered by blists - more mailing lists