Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752781AbcDZTGM (ORCPT ); Tue, 26 Apr 2016 15:06:12 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:33958 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241AbcDZTGJ (ORCPT ); Tue, 26 Apr 2016 15:06:09 -0400 MIME-Version: 1.0 In-Reply-To: <20160426190009.GC8162@amd> References: <1461605698-12385-1-git-send-email-jarkko.sakkinen@linux.intel.com> <20160426190009.GC8162@amd> From: Andy Lutomirski Date: Tue, 26 Apr 2016 12:05:48 -0700 Message-ID: Subject: Re: [PATCH 0/6] Intel Secure Guard Extensions To: Pavel Machek Cc: Jarkko Sakkinen , Greg KH , Andy Lutomirski , Borislav Petkov , Boris Ostrovsky , "open list:STAGING SUBSYSTEM" , Ingo Molnar , Kristen Carlson Accardi , "open list:DOCUMENTATION" , open list , Mathias Krause , Thomas Gleixner , Wan Zongshun Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1462 Lines: 29 On Tue, Apr 26, 2016 at 12:00 PM, Pavel Machek wrote: > On Mon 2016-04-25 20:34:07, 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. >> >> The firmware uses PRMRR registers to reserve an area of physical memory >> called Enclave Page Cache (EPC). There is a hardware unit in the >> processor called Memory Encryption Engine. The MEE encrypts and decrypts >> the EPC pages as they enter and leave the processor package. > > What are non-evil use cases for this? Storing your ssh private key encrypted such that even someone who completely compromises your system can't get the actual private key out. Using this in conjunction with an RPMB device to make it Rather Difficult (tm) for third parties to decrypt your disk even if you password has low entropy. There are plenty more. Think of this as the first time that a secure enclave will be widely available that anyone can program themselves. Well, almost: Skylake doesn't actually permit that for, ahem, reasons. But if you read the very most recent SDM update, it would appear that future Intel CPUs will allow this as long as the firmware doesn't get in the way. Look for IA32_SGXLEHASHSIG (possibly misspelled slightly -- the first few letters are correct). --Andy