Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp227800imu; Tue, 27 Nov 2018 11:27:38 -0800 (PST) X-Google-Smtp-Source: AJdET5cSTWJ6ggvI+uRZRivIJyYuyiXsVlhxBiByQdonEw/rIJX2q8TPC+WN4kPlRmSESDOLB5V2 X-Received: by 2002:a62:b15:: with SMTP id t21mr35377492pfi.136.1543346858215; Tue, 27 Nov 2018 11:27:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543346858; cv=none; d=google.com; s=arc-20160816; b=CAscYDyKHcpR7Iv64poFWzGzY1cZ5f0znOLw+XK2/3KEMRLA+Xxz3zFb+jfgdLrXBg tLpVgWkuo9tCg2gmngbloG0K5dHPb6Ha4jnnUNMnXmfbH2HHOSO/hpRlo9YgPbNPp5hC c7RwRauXcThfx3ShVPyicAtLtvAWTg93naQx1wbHJAiqMDsrZjDgbciLSdUY2H0t0gK6 FhOa+yXtxYRkrLjN5LihIH70U/WsOV9LM/2YnfVYKCExLPILbLC6NO/R/WpcNC4WEfST 46Htslj3otggaU4Ps9VbzJmdD5zFPdbnxyb1NT6FrE9iPu1OIViaIQxY3VpIaPko+WVC iu9w== 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=lYm7eK6tx6TVzYmXnRMed9o1II6zpyYVzMKA6HjkffY=; b=cc2cOLmTg+G7dHHoD1n/QqAL73AAbuq2s7qgMPYvpmZMR7FK5XbAzLCDCbJUb0DIgi Nwy2mjQjsmynTC7TGlPS3fSn6kmN3gYpp5wVo6qBTHUIte6kGST1N8H2jeC8iByIyAr8 r+yXcs/Qn7wi3tx2iY4n94nTeXDc8edm7wWEBEnVhc0SnWd+qD7icLAHCQ8ebw8qeWWW BJTMmsgR0G7yl9QPn1nabQ46wyHkxvvg+Q8jaua6rHyKP2aD+WSsBJkrhAXiczH+8UyE /bWUKpca8J+v1jgNyNhEpq8eIxIZEqfHFKj1JGWOX6fciCYhPhkg5OHWcfa9HzhPTKXZ zbZw== 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 c21si4546151plo.165.2018.11.27.11.27.22; Tue, 27 Nov 2018 11:27:38 -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 S1731180AbeK1Dj6 (ORCPT + 99 others); Tue, 27 Nov 2018 22:39:58 -0500 Received: from mga07.intel.com ([134.134.136.100]:39153 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbeK1Dj6 (ORCPT ); Tue, 27 Nov 2018 22:39:58 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2018 08:41:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,287,1539673200"; d="scan'208";a="112256592" Received: from jsakkine-mobl1.jf.intel.com (HELO localhost) ([10.24.8.96]) by fmsmga002.fm.intel.com with ESMTP; 27 Nov 2018 08:41:29 -0800 Date: Tue, 27 Nov 2018 08:41:29 -0800 From: Jarkko Sakkinen To: "Dr. Greg" Cc: Andy Lutomirski , Andy Lutomirski , X86 ML , Platform Driver , linux-sgx@vger.kernel.org, Dave Hansen , "Christopherson, Sean J" , nhorman@redhat.com, npmccallum@redhat.com, "Ayoun, Serge" , shay.katz-zamir@intel.com, haitao.huang@linux.intel.com, Andy Shevchenko , Thomas Gleixner , "Svahn, Kai" , mark.shanahan@intel.com, Suresh Siddha , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Darren Hart , Andy Shevchenko , LKML Subject: Re: [PATCH v17 18/23] platform/x86: Intel SGX driver Message-ID: <20181127164129.GB4170@linux.intel.com> References: <20181120120442.GA22172@linux.intel.com> <20181122111253.GA31150@wind.enjellic.com> <20181124172114.GB32210@linux.intel.com> <20181125145329.GA5777@linux.intel.com> <0669C300-02CB-4EA6-BF88-5C4B4DDAD4C7@amacapital.net> <20181126215145.GC868@linux.intel.com> <20181126230436.GA6737@linux.intel.com> <20181127085533.GA12247@wind.enjellic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181127085533.GA12247@wind.enjellic.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 Tue, Nov 27, 2018 at 02:55:33AM -0600, Dr. Greg wrote: > Since the thread has become a bit divergent I wanted to note that we > have offered a proposal for a general policy management framework > based on MRSIGNER values. This framework is consistent with the SGX > security model, ie. cryptographic rather then DAC based policy > controls. This framework also allows a much more flexible policy > implementation that doesn't result in combinatoric issues. > > Our framework also allows the preservation of the current ABI which > allows an EINITTOKEN to be passed in from userspace. The framework > also supports the ability to specify that only a kernel based launch > enclave (LE) should be available if the platform owner or distribution > should desire to implement such a model. > > The policy management framework is straight forward. Three linked > lists or their equivalent which are populated through /sysfs > pseudo-files or equivalent plumbing. Each list is populated with > MRSIGNER values for signing keys that are allowed to initialize > enclaves under three separate conditions. > > 1.) General enclaves without special attribute bits. > > 2.) Enclaves with the SGX_FLAGS_PROVISION_KEY attribute set. - i.e., > 'Provisioning Enclaves'. > > 3.) Enclaves with the SGX_FLAGS_LICENSE_KEY attribute set - i.e., 'Launch > Enclaves'. > > An all-null MRSIGNER value serves as a 'sealing' value that locks a > list from any further modifications. > > This architecture allows platform policies to be specified and then > sealed at early boot by the root user. At that point cryptographic > policy controls are in place rather then DAC based controls, the > latter of which have perpetual security liabilities in addition to the > useability constraints inherent in a DAC or device node model. > > We have developed an independent implementation of the PSW and > arguably have as much experience with issues surrounding how to > interact with the device driver as anyone. We have spent a lot of > time thinking about these issues and the above framework provides the > most flexible architecture available. Sounds like a lot bloat and policy added to the kernel whereas with Andy's proposal you can implement logic to a daemon and provide only mechanism to do it. /Jarkko