From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753966AbdLSXeG (ORCPT ); Tue, 19 Dec 2017 18:34:06 -0500 Received: from mga14.intel.com ([192.55.52.115]:45633 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753875AbdLSXd6 (ORCPT ); Tue, 19 Dec 2017 18:33:58 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,429,1508828400"; d="scan'208";a="185605520" Message-ID: <1513726426.2206.18.camel@linux.intel.com> Subject: Re: [PATCH v6 00/11] Intel SGX Driver From: Jarkko Sakkinen To: Pavel Machek Cc: platform-driver-x86@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , "David S. Miller" , Greg Kroah-Hartman , Grzegorz Andrejczuk , Haim Cohen , Ingo Molnar , Janakarajan Natarajan , Jim Mattson , Kan Liang , "Kirill A. Shutemov" , Kyle Huey , Len Brown , "open list:DOCUMENTATION" , "open list:FILESYSTEMS (VFS and infrastructure)" , Mauro Carvalho Chehab , Paolo Bonzini , Piotr Luc , Radim Kr??m???? , Randy Dunlap , Sean Christopherson , Thomas Gleixner , Tom Lendacky , Vikas Shivappa Date: Wed, 20 Dec 2017 01:33:46 +0200 In-Reply-To: <20171212140750.GA19663@localhost> References: <20171125193132.24321-1-jarkko.sakkinen@linux.intel.com> <20171212140750.GA19663@localhost> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-12-12 at 15:07 +0100, Pavel Machek wrote: > On Sat 2017-11-25 21:29:17, Jarkko Sakkinen wrote: > > 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. > > Would you list guarantees provided by SGX? > > For example, host can still observe timing of cachelines being > accessed by "protected" app, right? Can it also introduce bit flips? > > Pavel I'll give a more proper response to this now that all the reported major issues in the code have been fixed in v9. Yes, SGX is vulnerable to the L1 cacheline timing attacks. Jethro Beekman wrote a great summary about this on early March: https://jbeekman.nl/blog/2017/03/sgx-side-channel-attacks/ The counter measures are the same as without SGX. It really does not add or degrade security in this area. /Jarkko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1513726426.2206.18.camel@linux.intel.com> Subject: Re: [PATCH v6 00/11] Intel SGX Driver From: Jarkko Sakkinen To: Pavel Machek Cc: platform-driver-x86@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , "David S. Miller" , Greg Kroah-Hartman , Grzegorz Andrejczuk , Haim Cohen , Ingo Molnar , Janakarajan Natarajan , Jim Mattson , Kan Liang , "Kirill A. Shutemov" , Kyle Huey , Len Brown , "open list:DOCUMENTATION" , "open list:FILESYSTEMS (VFS and infrastructure)" , Mauro Carvalho Chehab , Paolo Bonzini , Piotr Luc , Radim Kr??m???? , Randy Dunlap , Sean Christopherson , Thomas Gleixner , Tom Lendacky , Vikas Shivappa Date: Wed, 20 Dec 2017 01:33:46 +0200 In-Reply-To: <20171212140750.GA19663@localhost> References: <20171125193132.24321-1-jarkko.sakkinen@linux.intel.com> <20171212140750.GA19663@localhost> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, 2017-12-12 at 15:07 +0100, Pavel Machek wrote: > On Sat 2017-11-25 21:29:17, Jarkko Sakkinen wrote: > > 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. > > Would you list guarantees provided by SGX? > > For example, host can still observe timing of cachelines being > accessed by "protected" app, right? Can it also introduce bit flips? > > Pavel I'll give a more proper response to this now that all the reported major issues in the code have been fixed in v9. Yes, SGX is vulnerable to the L1 cacheline timing attacks. Jethro Beekman wrote a great summary about this on early March: https://jbeekman.nl/blog/2017/03/sgx-side-channel-attacks/ The counter measures are the same as without SGX. It really does not add or degrade security in this area. /Jarkko From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH v6 00/11] Intel SGX Driver Date: Wed, 20 Dec 2017 01:33:46 +0200 Message-ID: <1513726426.2206.18.camel@linux.intel.com> References: <20171125193132.24321-1-jarkko.sakkinen@linux.intel.com> <20171212140750.GA19663@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20171212140750.GA19663@localhost> Sender: linux-fsdevel-owner@vger.kernel.org To: Pavel Machek Cc: platform-driver-x86@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , "David S. Miller" , Greg Kroah-Hartman , Grzegorz Andrejczuk , Haim Cohen , Ingo Molnar , Janakarajan Natarajan , Jim Mattson , Kan Liang , "Kirill A. Shutemov" , Kyle Huey , Len Brown , "open list:DOCUMENTATION" , "open list:FILESYSTEMS (VFS and infrastructure)" , Mauro Carvalho Chehab , Paolo Bonzini List-Id: platform-driver-x86.vger.kernel.org On Tue, 2017-12-12 at 15:07 +0100, Pavel Machek wrote: > On Sat 2017-11-25 21:29:17, Jarkko Sakkinen wrote: > > 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. > > Would you list guarantees provided by SGX? > > For example, host can still observe timing of cachelines being > accessed by "protected" app, right? Can it also introduce bit flips? > > Pavel I'll give a more proper response to this now that all the reported major issues in the code have been fixed in v9. Yes, SGX is vulnerable to the L1 cacheline timing attacks. Jethro Beekman wrote a great summary about this on early March: https://jbeekman.nl/blog/2017/03/sgx-side-channel-attacks/ The counter measures are the same as without SGX. It really does not add or degrade security in this area. /Jarkko