[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181209200600.GA11608@amd>
Date: Sun, 9 Dec 2018 21:06:00 +0100
From: Pavel Machek <pavel@....cz>
To: Josh Triplett <josh@...htriplett.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>, x86@...nel.org,
platform-driver-x86@...r.kernel.org, dave.hansen@...el.com,
sean.j.christopherson@...el.com, nhorman@...hat.com,
npmccallum@...hat.com, Alexei Starovoitov <ast@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...e.de>,
"David S. Miller" <davem@...emloft.net>,
David Woodhouse <dwmw@...zon.co.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
"open list:INTEL SGX" <intel-sgx-kernel-dev@...ts.01.org>,
Janakarajan Natarajan <Janakarajan.Natarajan@....com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)"
<kvm@...r.kernel.org>, Len Brown <len.brown@...el.com>,
Linus Walleij <linus.walleij@...aro.org>,
"open list:CRYPTO API" <linux-crypto@...r.kernel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:SPARSE CHECKER" <linux-sparse@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tom Lendacky <thomas.lendacky@....com>,
Vikas Shivappa <vikas.shivappa@...ux.intel.com>
Subject: Re: [PATCH v11 00/13] Intel SGX1 support
Hi!
(sorry to bring up old thread).
> > > > > Intel(R) SGX is a set of CPU instructions that can be used by applications
> > > > > to set aside private regions of code and data. The code outside the enclave
> > > > > is disallowed to access the memory inside the enclave by the CPU access
> > > > > control. In a way you can think that SGX provides inverted sandbox. It
> > > > > protects the application from a malicious host.
> > > >
> > > > Do you intend to allow non-root applications to use SGX?
> > > >
> > > > What are non-evil uses for SGX?
> > > >
> > > > ...because it is quite useful for some kinds of evil:
> > >
> > > The default permissions for the device are 600.
> >
> > Good. This does not belong to non-root.
>
> There are entirely legitimate use cases for using this as an
> unprivileged user. However, that'll be up to system and distribution
> policy, which can evolve over time, and it makes sense for the *initial*
> kernel permission to start out root-only and then adjust permissions via
> udev.
Agreed.
> > What are some non-evil uses for SGX?
>
> Building a software certificate store. Hardening key-agent software like
> ssh-agent or gpg-agent. Building a challenge-response authentication
> system. Providing more assurance that your server infrastructure is
> uncompromised. Offloading computation to a system without having to
> fully trust that system.
I think you can do the crypto stuff... as crypto already verifies the
results. But I don't think you can do the computation offload.
> As one of many possibilities, imagine a distcc that didn't have to trust
> the compile nodes. The compile nodes could fail to return results at
> all, but they couldn't alter the results.
distcc on untrusted nodes ... oh yes, that would be great.
Except that you can't do it, right? :-).
First, AFAICT it would be quite hard to get gcc to run under SGX. But
maybe you have spare month or three and can do it.
But ... you really can't guarantee getting right results. Evil owner
of the machine might intentionaly overheat the CPU, glitch the power,
induce single-bit errors using gamma source, ... You can't do it.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists