Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1904966imm; Mon, 3 Sep 2018 12:32:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYbqXaPlEYmdEOyEr72Cq1qrqIiiQvTMUESha1vHO9Vk1Cm52kzXNXnnvi92UqE4r2mmVmS X-Received: by 2002:a63:e255:: with SMTP id y21-v6mr13158946pgj.160.1536003175344; Mon, 03 Sep 2018 12:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536003175; cv=none; d=google.com; s=arc-20160816; b=r/igfsEuVzSkkD6f9n/C+7d8aONwr5DWDN3YngSsLSSoaAAoWL96reydkP0HNOVT1F sLiFp+h2/Lylh/Izdi1RmYQDwODtjvTbcLb3Hg71FdLO0HKXvVliQyxFDzjEczNLv0JP bQnqJNY5rdOQq+WHluLlcpeL8FbpjSPu1ceLdrfqz/hKtETwrO8Lxye8tXIe585J42WF 2Z/6ZXMrh11rn6nnW+/lkMej+XMydXxkwPpumvY9YLth8unIk7vO+j/etuzZYDcptPG3 35qVdttoOG6dJ30qB+vyv/uEdk3ShNI7DUlHl6GMK4fJ0sCiabcNmUAmAF/xMj0k5sNO m59Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=xcZqIlXrY6u5MZSb9uaMAkiY4Mv7bxD1qHLB1adxjuQ=; b=I6fmjcY6wFgeQvGcfYFAtbEaRcmn7lzCUSHR3/jt1srvAMNs3wLtuO+UCCdFIPYsT+ Ssw+gq4kNMwZwSiWoLZQowsfvHqrhk8ZegIbIJhL7fOQGmUBCj79Jo6Lx5S2ZIjCYipc Ng5tuhznJrT07vNk7sElsPvyaVpisuJfPqcR1GWihnj6SvxrplzoYgqOzSUMkeYi5beI DpdZpuHCyCufpD7JohZ/0pR9hMxCnkvCgTlcTn9lUKqp7QgjfEz5hAwEZwqfQNAfF72/ m/fnI+0eo07dS2bH48+V1PNfjfuHI/oBnKHgI9u6gzEGxZlXIv1ODSD0f5IRXjIfYqKo NH2g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m124-v6si18349678pfm.303.2018.09.03.12.32.40; Mon, 03 Sep 2018 12:32:55 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728582AbeICXwv (ORCPT + 99 others); Mon, 3 Sep 2018 19:52:51 -0400 Received: from mga07.intel.com ([134.134.136.100]:36174 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728108AbeICXwv (ORCPT ); Mon, 3 Sep 2018 19:52:51 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,326,1531810800"; d="scan'208";a="85697247" Received: from fonsecan-mobl.ger.corp.intel.com (HELO localhost) ([10.249.36.49]) by fmsmga004.fm.intel.com with ESMTP; 03 Sep 2018 12:27:55 -0700 Date: Mon, 3 Sep 2018 22:27:54 +0300 From: Jarkko Sakkinen To: "Dr. Greg" Cc: Sean Christopherson , "Huang, Kai" , "platform-driver-x86@vger.kernel.org" , "x86@kernel.org" , "nhorman@redhat.com" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "suresh.b.siddha@intel.com" , "Ayoun, Serge" , "hpa@zytor.com" , "npmccallum@redhat.com" , "mingo@redhat.com" , "linux-sgx@vger.kernel.org" , "Hansen, Dave" Subject: Re: [PATCH v13 10/13] x86/sgx: Add sgx_einit() for initializing enclaves Message-ID: <20180903192754.GD13497@linux.intel.com> References: <20180827185507.17087-11-jarkko.sakkinen@linux.intel.com> <1535406078.3416.9.camel@intel.com> <20180828070129.GA5301@linux.intel.com> <105F7BF4D0229846AF094488D65A09893541037C@PGSMSX112.gar.corp.intel.com> <20180829203351.GB7142@linux.intel.com> <105F7BF4D0229846AF094488D65A09893541195D@PGSMSX112.gar.corp.intel.com> <20180829210901.GA7176@linux.intel.com> <105F7BF4D0229846AF094488D65A098935412392@PGSMSX112.gar.corp.intel.com> <20180831174330.GA21555@linux.intel.com> <20180831213445.GA4098@wind.enjellic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831213445.GA4098@wind.enjellic.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 31, 2018 at 04:34:45PM -0500, Dr. Greg wrote: > On Fri, Aug 31, 2018 at 10:43:30AM -0700, Sean Christopherson wrote: > > Good afternoon to everyone. > > > > Sorry I missed this one. To be honest I don't know. I checked the > > > SDM and all I can find is: > > > > > > "On reset, the default value is the digest of Intel's signing key." > > > I confirmed the MSRs are reset any time the EPC is lost. Not sure > > what happens if the MSRs contained a non-Intel value but feature > > control is locked with SGX launch control disabled. I'll post an > > update when I have an answer. > > It was our interpretation from the SDM that the identity modulus > signature MSR's are 'trap-door' registers. If flexible launch control > (FLC) is enabled the platform has one opportunity to write a new > signature value, after which the registers are locked from > modification until the next platform reset. In the driver we support only MSRs that are left writable by the BIOS before locking the feature control. > From a security architecture perspective it seemed that an FLC based > SGX implementation would use a modified version of TBOOT to securely > write that register once per platform boot/reset. The architecture > that is being discussed where there is a need to continually check > whether or not the correct root signing key is loaded sounds a bit > clunky at best. > > At worst it has potential security implications since it is the > reponsibility of the enclave launch control infrastructure to control > which enclaves are allowed to have the PROVISION_KEY attribute bit > set. Based on the previous feedback supporting read-only MSRs in the driver is an unwanted feature i.e. the kernel must be able to decide what gets lauched (i.e. no launch enclave). > Have a good weekend. > > Dr. Greg > > As always, > Dr. G.W. Wettstein, Ph.D. Enjellic Systems Development, LLC. > 4206 N. 19th Ave. Specializing in information infra-structure > Fargo, ND 58102 development. > PH: 701-281-1686 > FAX: 701-281-3949 EMAIL: greg@enjellic.com > ------------------------------------------------------------------------------ > "Extensive interviews show that not one alcoholic has ever actually seen > a pink elephant." > -- Yale University > Center of Alcohol Studies /Jarkko