Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2813505imu; Sun, 23 Dec 2018 08:21:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDBOlO+sUqAzzLKWWDuN3yo87eZbeC9CTLKloSKV31MVZh6r1td9q3xPZsEsE01leu4wJL X-Received: by 2002:a62:5884:: with SMTP id m126mr10142731pfb.177.1545582088249; Sun, 23 Dec 2018 08:21:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545582088; cv=none; d=google.com; s=arc-20160816; b=aKtt9G3UvcvcjpeeNtUgsjnhp24jgolXjJAKGxwq1WKoVfyBd72zaOaW0b/ohPRAt+ Mfm7NMqxsbuKcrO+VBmO42a6vEYv0FgFgazbFPSZ05+CEmjxW1ivKc4SBJW1SR7BGWlx 0yrVggkdegSPwUcu/XQjj1sJ56+4GnHb9ZXyybzIyHmVXPyhm0KLiJH/EqzBCl/XzP6Y cn8cxTHgO/DgKe7KlbdXZsXab2Fx3Q9kswUlesFR/t68w5nog+DjJfV2f/nMq6k6QE7H gLP9xKgi2hAUabFbdcjrsDR8FHkAnGfZ2T98fsWLxdIQvokNcmgGQBwg9CyoW3fxE5wN K87A== 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; bh=kxsfeJDmSLa+ed33KxlTg8QBcMCJ/wUHqrzC/0TB12Q=; b=gjn9eg0PoDO0K5gbrp2O9rzkPsdkCBmTcpjWkbFXz7flbXA4SBYbtj9y34Iy5e7BV7 d+u+YZneidlbQb778Xxu24ygxHLv4GJMDMxX3ZRNw7Whg23gBi4udgsCyijVV1UCrz6K 6d9XyJRRUvORp0ZA1Ko6UY3Vt4PMMm6+aPKENBxXCMYkbqMmOkpKFokwssZ8zc28bhCs 5JQXUbi+Cj233ZlojTDBhwakb7z3GwkY1czlwqW27vYPedkP02x9o1UuHjYLzbfNJC+0 1+KJx+gsP4j8/8wlEVya5MlVeaCnyQsk9yV4PYMVbesrrmMbqiJXnl66luClKyprJhtD oDrA== 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 n59si11231896plb.388.2018.12.23.08.21.12; Sun, 23 Dec 2018 08:21:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392606AbeLVRis (ORCPT + 99 others); Sat, 22 Dec 2018 12:38:48 -0500 Received: from mga09.intel.com ([134.134.136.24]:5578 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389447AbeLVRis (ORCPT ); Sat, 22 Dec 2018 12:38:48 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2018 00:16:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,383,1539673200"; d="scan'208";a="305910739" Received: from ncanderx-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.238]) by fmsmga005.fm.intel.com with ESMTP; 22 Dec 2018 00:16:51 -0800 Date: Sat, 22 Dec 2018 10:16:49 +0200 From: Jarkko Sakkinen To: Andy Lutomirski , Sean Christopherson Cc: Jethro Beekman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "x86@kernel.org" , Dave Hansen , Peter Zijlstra , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "linux-sgx@vger.kernel.org" , Josh Triplett , Haitao Huang , "Dr . Greg Wettstein" Subject: Re: x86/sgx: uapi change proposal Message-ID: <20181222081649.GB8895@linux.intel.com> References: <20181214215729.4221-1-sean.j.christopherson@intel.com> <7706b2aa71312e1f0009958bcab24e1e9d8d1237.camel@linux.intel.com> <598cd050-f0b5-d18c-96a0-915f02525e3e@fortanix.com> <20181219091148.GA5121@linux.intel.com> <613c6814-4e71-38e5-444a-545f0e286df8@fortanix.com> <20181219144515.GA30909@linux.intel.com> <20181220103204.GB26410@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181220103204.GB26410@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 20, 2018 at 12:32:04PM +0200, Jarkko Sakkinen wrote: > On Wed, Dec 19, 2018 at 06:58:48PM -0800, Andy Lutomirski wrote: > > Can one of you explain why SGX_ENCLAVE_CREATE is better than just > > opening a new instance of /dev/sgx for each encalve? > > I think that fits better to the SCM_RIGHTS scenario i.e. you could send > the enclav to a process that does not have necessarily have rights to > /dev/sgx. Gives more robust environment to configure SGX. Sean, is this why you wanted enclave fd and anon inode and not just use the address space of /dev/sgx? Just taking notes of all observations. I'm not sure what your rationale was (maybe it was somewhere). This was something I made up, and this one is wrong deduction. You can easily get the same benefit with /dev/sgx associated fd representing the enclave. This all means that for v19 I'm going without enclave fd involved with fd to /dev/sgx representing the enclave. No anon inodes will be involved. /Jarkko