Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5186475imm; Tue, 19 Jun 2018 06:32:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL52imeVB61U03Bd61Zc3Lq8t77lifUGV5FawCGLdc2vd9EJA8ej/jB9Wfa1/xdrNYBGTW1 X-Received: by 2002:a62:bd03:: with SMTP id a3-v6mr18068764pff.138.1529415160166; Tue, 19 Jun 2018 06:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529415160; cv=none; d=google.com; s=arc-20160816; b=jZ+cqaIySLryVvgxRfq9Rw3RWCCPl26wvlI+7X8KcU3Fzz1lxUbWbVX9wQGYllUSqm DPP+dVYoS5USHqS1sTSkYmVP4aqaJ1BC6X4qMxSOvkLzWdtMnL9kO6Dpw4xhrEKzZf5V peuDXo/sKFmu3Q5d8IVDE8/B1bCotgUePUkBOSITFn6AWVZ3OQfAqMDn6Ts5Nsh1g6JP jCdZBqflZ4ZsKgtC5p78xyW/ORVjy61sSGZPGT+tyuFDzMaCz8GtjbTGGWl6x9hNl0yy ZgsWOpDo/vBtQF+UTGWRbc9POsC43tBDmSMiPOotNh7Tdjhd7jtVjIajHGDJAIu2Rn2D 7dKg== 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=z2Yta1B8lu2zCiufZOgTBZ3uKdFY8ONjbioSCZw8fzw=; b=y0DGhEu0lsKlX/+S/CjUqpUCY/BV/CkDIhvFRpKh2S50VTrvqKpdgtR94J3EmZXrQR WGOWX6aU1hgIXf+Y0x2hx/McUE9Du9ts+D6e2ydVBZzKkj5HeVs1TsKi66E+3TNCKzRk droUd04jGBrFSv9rWngdUZOEsQH9SqNqq45dg+F1urxV9bbfzHzV8NMgDjXGrvcQm0r8 wp+jM26Q+4rajOuCXKL5CUymofayb3Ox7NCuqHtNSM6e8nieZ9R5Hzj1oz4XR43A86HI TCW75qkHemdsVs2K7gjs0vsNVikEJ7xyrsjI8C9PU/JBUQKjKzSjIlFGkjtUyhMSZLbk P9Wg== 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 bj8-v6si16904021plb.439.2018.06.19.06.32.18; Tue, 19 Jun 2018 06:32:40 -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 S1757247AbeFSNax (ORCPT + 99 others); Tue, 19 Jun 2018 09:30:53 -0400 Received: from mga02.intel.com ([134.134.136.20]:43299 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753145AbeFSNav (ORCPT ); Tue, 19 Jun 2018 09:30:51 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2018 06:30:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,243,1526367600"; d="scan'208";a="48237076" Received: from aluisell-mobl2.ger.corp.intel.com (HELO localhost) ([10.249.254.128]) by fmsmga007.fm.intel.com with ESMTP; 19 Jun 2018 06:30:44 -0700 Date: Tue, 19 Jun 2018 16:30:43 +0300 From: Jarkko Sakkinen To: Jethro Beekman Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "open list:DOCUMENTATION" , open list Subject: Re: [PATCH v11 12/13] intel_sgx: driver documentation Message-ID: <20180619133043.GG5609@linux.intel.com> References: <20180608171216.26521-1-jarkko.sakkinen@linux.intel.com> <20180608171216.26521-13-jarkko.sakkinen@linux.intel.com> <6200618e-bcc8-23ba-afe8-4c6be8b364f0@fortanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6200618e-bcc8-23ba-afe8-4c6be8b364f0@fortanix.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, Jun 08, 2018 at 11:32:17AM -0700, Jethro Beekman wrote: > On 2018-06-08 10:09, Jarkko Sakkinen wrote: > > +Launching enclaves > > +------------------ > > + > > +For privileged enclaves the launch is performed simply by submitting the > > +SIGSTRUCT for that enclave to ENCLS(EINIT). For unprivileged enclaves the > > +driver hosts a process in ring-3 that hosts a launch enclave signed with a key > > +supplied for kbuild. > > + > > +The current implementation of the launch enclave generates a token for any > > +enclave. In the future it could be potentially extended to have ways to > > +configure policy what can be lauched. > > + > > +The driver will fail to initialize if it cannot start its own launch enclave. > > +A user space application can submit a SIGSTRUCT instance through the ioctl API. > > +The kernel will take care of the rest. > > + > > +This design assures that the Linux kernel has always full control, which > > +enclaves get to launch and which do not, even if the public key MSRs are > > As discussed previously at length, since the kernel needs to execute > ENCLS[EINIT], it has full control to deny the launching of enclaves > regardless of any launch enclave implementation. Please change this > misleading statement. Remember the discussion, forgot to change it. I'll fix this for the next version. /Jarkko