Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3363141imu; Mon, 10 Dec 2018 00:28:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uh6M3lJqLcojnLXMPmlWtQfs8mj3EuvNVyFgeoMG39wR7Vacgs1x+1mhiW2l3bKsucc+hu X-Received: by 2002:a63:5e43:: with SMTP id s64mr10189105pgb.101.1544430483824; Mon, 10 Dec 2018 00:28:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544430483; cv=none; d=google.com; s=arc-20160816; b=Na69UPNTTlVsNLwlckEhfgCj5Dd9wHEi7zrYkBeQPlBu3+4qYg+ckRkQIydYU44p2m 20DKeJWrUCrElcdlRvgZ0XS9ltgWPVbN1bek7z0d5QUnPHi3RUnAsaqbCg+ybR1iWT87 83AdJQyPiWlHqUsN8eT7HIetK5hyqv6IW8SD+z6T5vPNqXkxyh3sfAQ1KUbhkSiAjABM THSnexEpxWuXLUiCjTQc4K6tMCaHQ9DEb8k6swQ7MhaPbsDv+s+MympOfJwh6RdYI0O0 zpNx0Ya1L15u6vh7FwOQfcN45qIlbE4wDSOjBbkFgub4G69JkRDQNwHLxABmxGtiULeg XRAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=V4GYXCJuqlv1u7MK132he0aRhmDG7NzJsCG9caEXZJE=; b=OfZ/k/RgniruT8CBeUbpCZ0aNqfEr/2yoO70XBXXgV3EDTNS3J1fA/PK1loyiBmH5H IQhliIQC2J7cgRNPKMciIXBjfQU8GNJB2HNDI9JyIVBkMJBC030L5fN9pWNBC8N1St/4 0Hp0pUkixY2nyrNzoK39tdlG6cq1Cmvbn6GDuKmDE2Dngs/KXJ+ClgPpE8t6UudV9M3V yIbSxQGXPQyLDdLCBrU+ew763XD8tWVV2Qt2ZjIZHMmRWu+TqINhRgO3/RQfIrWbi0sc D9icf3LqeOmGO0wGBLro0R+bwooDKZtqdWcEqynxzkUx2HwWZNay6Z8NgkHKphCTAnZW 4R/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si8943560pgk.312.2018.12.10.00.27.48; Mon, 10 Dec 2018 00:28:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726581AbeLJI1K (ORCPT + 99 others); Mon, 10 Dec 2018 03:27:10 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:56076 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbeLJI1K (ORCPT ); Mon, 10 Dec 2018 03:27:10 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 9F63E807A6; Mon, 10 Dec 2018 09:27:01 +0100 (CET) Date: Mon, 10 Dec 2018 09:27:04 +0100 From: Pavel Machek To: Josh Triplett Cc: Jarkko Sakkinen , x86@kernel.org, platform-driver-x86@vger.kernel.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, Alexei Starovoitov , Andi Kleen , Andrew Morton , Andy Lutomirski , Borislav Petkov , "David S. Miller" , David Woodhouse , Greg Kroah-Hartman , "H. Peter Anvin" , Ingo Molnar , "open list:INTEL SGX" , Janakarajan Natarajan , "Kirill A. Shutemov" , Konrad Rzeszutek Wilk , "open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)" , Len Brown , Linus Walleij , "open list:CRYPTO API" , "open list:DOCUMENTATION" , open list , "open list:SPARSE CHECKER" , Mauro Carvalho Chehab , Peter Zijlstra , "Rafael J. Wysocki" , Randy Dunlap , Ricardo Neri , Thomas Gleixner , Tom Lendacky , Vikas Shivappa Subject: Re: [PATCH v11 00/13] Intel SGX1 support Message-ID: <20181210082704.GA14594@amd> References: <20180608171216.26521-1-jarkko.sakkinen@linux.intel.com> <20180612105011.GA26931@amd> <20180619145943.GC8034@linux.intel.com> <20180619200414.GA3143@amd> <20180619214833.GA5873@localhost> <20181209200600.GA11608@amd> <20181210074717.GA9880@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20181210074717.GA9880@localhost> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun 2018-12-09 23:47:17, Josh Triplett wrote: > On Sun, Dec 09, 2018 at 09:06:00PM +0100, Pavel Machek wrote: > ... > > > > > The default permissions for the device are 600. > > > >=20 > > > > Good. This does not belong to non-root. > > >=20 > > > 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 *initi= al* > > > kernel permission to start out root-only and then adjust permissions = via > > > udev. > >=20 > > Agreed. > >=20 > > > Building a software certificate store. Hardening key-agent software l= ike > > > 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. > >=20 > > 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. >=20 > You can, as long as you can do attestation. You can not, because random errors are very easy to trigger for person with physical access, as I explained in the part of email you stripped. > > > As one of many possibilities, imagine a distcc that didn't have to tr= ust > > > the compile nodes. The compile nodes could fail to return results at > > > all, but they couldn't alter the results. > >=20 > > distcc on untrusted nodes ... oh yes, that would be great. > >=20 > > Except that you can't do it, right? :-). > >=20 > > 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. >=20 > Assuming you don't need to #include files, gcc seems quite simple to run > in an enclave: data in, computation inside, data out. So is there a plan to run dynamically linked binaries inside enclave? Or maybe even python/shell scripts? It looked to me like virtual memory will be "interesting" for enclaves. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwOI1gACgkQMOfwapXb+vLmawCgoL+ivKPUBf9B9dD7LjJnawsy T8YAoIpGC5LiF84jvJgnIzvNVAFu+Wrx =jQvj -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--