Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp973541imu; Thu, 20 Dec 2018 08:09:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/WpE1aOvId+G+oSQvQMGTv+kJx4O8eg3vjQoHDij17gFyylCdwoAhkYOCOXABQUiA80Hrf0 X-Received: by 2002:a62:ab0d:: with SMTP id p13mr24886685pff.211.1545322192505; Thu, 20 Dec 2018 08:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545322192; cv=none; d=google.com; s=arc-20160816; b=wsNSyvt2BxrfiZGOme/ROdesL6j44mevx/KqdDjH5xSoKYrmXZ3ZThqaflOwTErnpJ wl/aD3SGfcPDlfsQ7KHGyXK+shPAigkZAazscOQSu8mEV83UxScJW8bY3UjIXze8XtKQ 0mLvIU+yps0RmsA5zqVCoy3lO+7Y51BIw5CRlNYsGlILMLmaaZUSKtoP5ymzdZp+FBab 1zWEwMFEjRT5zBjswuBn4ZsgLQcHCMN4yzNrU3u1QQGFYxsjG3x/A3ItfQ/BHgtCOl/W JuAhn2u/kvdS57qx4XQs6uJNEOzJEqWrNGls0k0f8762xO2DvYV6+V9GR1BO/lROaFfM qFMQ== 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=8ge1qMsmKDfSiWQriFb1MRfFtnxV3gUVjEreSILsUOk=; b=KyCPJg+tHkWXbjv4gAoXOExYUeGer+SX0pXElnadcRJ35Sth9ZWzcIg4/6nUw7MOJT TRezUvjW1QujZy3iRs9MxGmQg3MjTbiUpqhUfqicnvvZoAAU7/Cmij14QCpuVWZoG/s9 MMFVBrIOg0RuLTat9B+LeOIt8Ys6NY1Ubi4TW3lLge5u4yDvGq91BXDQPjVAcwCGMU3n +1E6Wx9d/WBu9qpCyWh/isIM4vVTWQGjdxOYL+aoAJn80HncIgxToPEHwO3T2LFBgYv2 PJ0/4JitpCV3h+AndTxZQXmWwZWg4f7R2RTlW4mumnkNdp5ccLpGR+yZZBKUpRQ8GV9R NOXA== 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 d142si7435024pfd.93.2018.12.20.08.09.36; Thu, 20 Dec 2018 08:09:52 -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 S1732530AbeLTNUF (ORCPT + 99 others); Thu, 20 Dec 2018 08:20:05 -0500 Received: from mga05.intel.com ([192.55.52.43]:48383 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732391AbeLTNUE (ORCPT ); Thu, 20 Dec 2018 08:20:04 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2018 05:20:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,377,1539673200"; d="scan'208";a="285273460" Received: from unknown (HELO localhost) ([10.249.254.232]) by orsmga005.jf.intel.com with ESMTP; 20 Dec 2018 05:19:57 -0800 Date: Thu, 20 Dec 2018 15:19:55 +0200 From: Jarkko Sakkinen To: Andy Lutomirski Cc: Sean Christopherson , 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: <20181220131955.GB4848@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> <20181220131213.GA4848@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181220131213.GA4848@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 03:12:13PM +0200, Jarkko Sakkinen wrote: > 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. > > My only open for the implementation is where to swap? If it is a VMA, > whose VMA? > > Please share your views here. Not a blocker for me to work on the > implementation, though. I'll use a private shmem file up until there > is a better option. > > This ioctl API discussion is kind of meaningless for me ATM because it > does not have that much effect to the internals even if it wouldn't be > perfect in v19. Very trival to change. Oops, and after sending I realized that I started this thread asking comments about the API (I think I mentioned swapping though too) :-) The feedback has been valuable and I gained the required understanding about enclave_fd but I think that now the things have been saturated to minor details. Appreciate all the feedback so far. Sorry for a bit harsh statement. /Jarkko