Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp181043yba; Mon, 20 May 2019 07:02:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+razvlwdcChtvfmP+woQepk/LmeL1zOoxqTnj55DdK3aLlRL777+Ncm5468VXlsVjQ38q X-Received: by 2002:a65:56c5:: with SMTP id w5mr75901060pgs.434.1558360941023; Mon, 20 May 2019 07:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558360941; cv=none; d=google.com; s=arc-20160816; b=oe2mvHf1uvLNG1yszfg55fPp52gkElqlN3dbUk089LPyDBxrwUM97riurw7Zpi6ph8 n8X/+15tIfbdHr4J/sxm+LblxmIZ14DTfb434iQPR/ZjKNOhujQhSdEpakCqNyseleUi MqCRwyoIGBfBtmwSulP9FdwJBcCUwxfIKMMve2sqneIBvC2sxGYDvzc2f6QiIYk9Uc8l iirRaCV2Ugw0M8a5T9fgwSo+6VUgV3QzbEM1OaH6CNkWzhOhiiehE26sTm/Vy0FD+TPd 7EIHRjHGV4XyJgIJTtGhXxds2eA+lpLH0wq+yai4HUfYbAEEe/Zt9tzIIX/osLB+mlsy lAJg== 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=YI19fRdpfWRyt4doLGzHEdMM6CMkHUbkpoIvXJEL+Bg=; b=UmKWImotZ6FBIFZY+t//vighVz7lxc0zT8ABszQGv1wP0qFqWZOvUGoecl5oYB3Oxg ljylDvIcg1BijlycGhxLEL0F3BYKjVpOxYJtBqllKsctq5klXigzZ1k8wXWNVlePdaGF 02yoEf1yeBcppsOUAvxJqjKKKGDpTLtlfCEblL8fujVQw1350VJKmFrg4+aFezr+JU79 DPd4o3MrKUnNrKMEP1vI0KEhRwRmrp9u+Vg+F5GX+uMBR58K6DgV3HLwV6nMlED1bU6U TwgzzMXzmmHfH+cNpb77m3Lrm86wod4390cJ20dAjGs96qW0KpkW6JyboTRQ9xeoMxxF 2FXQ== 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 n14si19722341pfa.67.2019.05.20.07.02.04; Mon, 20 May 2019 07:02:21 -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 S1732836AbfETL36 (ORCPT + 99 others); Mon, 20 May 2019 07:29:58 -0400 Received: from mga11.intel.com ([192.55.52.93]:40347 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731225AbfETL35 (ORCPT ); Mon, 20 May 2019 07:29:57 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2019 04:29:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,491,1549958400"; d="scan'208";a="173589444" Received: from mhauser-mobl.ger.corp.intel.com (HELO localhost) ([10.252.47.244]) by fmsmga002.fm.intel.com with ESMTP; 20 May 2019 04:29:46 -0700 Date: Mon, 20 May 2019 14:29:45 +0300 From: Jarkko Sakkinen To: Sean Christopherson Cc: Andy Lutomirski , James Morris , "Serge E. Hallyn" , LSM List , Paul Moore , Stephen Smalley , Eric Paris , selinux@vger.kernel.org, Jethro Beekman , "Xing, Cedric" , "Hansen, Dave" , Thomas Gleixner , "Dr. Greg" , Linus Torvalds , LKML , X86 ML , "linux-sgx@vger.kernel.org" , Andrew Morton , "nhorman@redhat.com" , "npmccallum@redhat.com" , "Ayoun, Serge" , "Katz-zamir, Shay" , "Huang, Haitao" , Andy Shevchenko , "Svahn, Kai" , Borislav Petkov , Josh Triplett , "Huang, Kai" , David Rientjes Subject: Re: SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support) Message-ID: <20190520112945.GA27805@linux.intel.com> References: <20190513102926.GD8743@linux.intel.com> <20190514104323.GA7591@linux.intel.com> <20190514204527.GC1977@linux.intel.com> <20190515013031.GF1977@linux.intel.com> <20190516051622.GC6388@linux.intel.com> <20190516224550.GC11204@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516224550.GC11204@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, May 16, 2019 at 03:45:50PM -0700, Sean Christopherson wrote: > On Thu, May 16, 2019 at 02:02:58PM -0700, Andy Lutomirski wrote: > > > On May 15, 2019, at 10:16 PM, Jarkko Sakkinen wrote: > > > There is a problem here though. Usually the enclave itself is just a > > > loader that then loads the application from outside source and creates > > > the executable pages from the content. > > > > > > A great example of this is Graphene that bootstraps unmodified Linux > > > applications to an enclave: > > > > > > https://github.com/oscarlab/graphene > > > > > > > ISTM you should need EXECMEM or similar to run Graphene, then. > > Agreed, Graphene is effectively running arbitrary enclave code. I'm > guessing there is nothing that prevents extending/reworking Graphene to > allow generating the enclave ahead of time so as to avoid populating the > guts of the enclave at runtime, i.e. it's likely possible to run an > unmodified application in an enclave without EXECMEM if that's something > Graphene or its users really care about. I'd guess that also people adding SGX support to containers want somewhat similar framework to work on so that you can just wrap a container with an enclave. /Jarkko