Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4675441ybi; Mon, 3 Jun 2019 15:19:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHIuHmsDK3JTyuWcDEFKwU+a9xZUUnoa4wIrlySSK15mITUBkyRDuW3Ej4IDwiF/v0zRtI X-Received: by 2002:a62:868e:: with SMTP id x136mr26848369pfd.221.1559600355946; Mon, 03 Jun 2019 15:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559600355; cv=none; d=google.com; s=arc-20160816; b=SXGwFsuZTbFgVs/wCOVbblJkjz+wpzDMJlxJpECK3s6cZCLn0Est9Vz+IvX8oP2LjP 8T4xOarY1aMwZTWeoZaX2BJbiKCiLyU1vn0lr1zyVKhLsaUQ5pNGZlwk7N9yj/TQnsnH zpgnIjK+UiuIa2EY9SOm7ynK8jlT62JXcKjp3KanW7LsyKx+0fxgrMZ7HwkRUVO1tISo +mlSgKfRHi79MTv89Yk/ibOo8AuIULVUorLA8VpTQSKdNqAt60A+B2ETwgG/GjqIwATu Jw+FsI+/t0cGxdROhgUw8veRkf6EkcopEFf/k121b+dhTLTCUxquXAaCFium90SNeN0O 1S4g== 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=oRGE4vC2CDktyYCqhW8xr8ZnNB2LraLjj2wHep2khCc=; b=e7p5UXupGDI5UY9UVQmjZIH5qeIiJkzlXT7e2NgY5xMD59fXt5Djo1AqQz3lzwwu0w gtgw8cE8pxNZkkEU9D4C9rexJPtjnJhqDVLG0/5oNdVJNoC0aFLfK4qV600RrJF1fbeW aYAaq4IZB/fcVfWrRXwqG1e5WAQyq2hhz74OEtybk5QrObv1jK7fDUehgDPRsJDITZW1 h2yO/uKoN+esOFekt4X8Z4nnO9/2YJhjPTBFPwCeBZnpOqGgy1hGa+If8Mr6yTeSndXi UKM4p/m26IC6YzCzcWuGJqicxkxXvA+EuKPP5L0M4Az9YWHmLaLugxtCi/ODsk+kR1HL et9g== 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 q4si23066083pfb.272.2019.06.03.15.18.59; Mon, 03 Jun 2019 15:19:15 -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 S1726761AbfFCWQo (ORCPT + 99 others); Mon, 3 Jun 2019 18:16:44 -0400 Received: from mga09.intel.com ([134.134.136.24]:19879 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbfFCWQo (ORCPT ); Mon, 3 Jun 2019 18:16:44 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 13:54:20 -0700 X-ExtLoop1: 1 Received: from jgaire-mobl.ger.corp.intel.com (HELO localhost) ([10.252.20.169]) by orsmga001.jf.intel.com with ESMTP; 03 Jun 2019 13:54:07 -0700 Date: Mon, 3 Jun 2019 23:54:05 +0300 From: Jarkko Sakkinen To: Andy Lutomirski Cc: Stephen Smalley , "Xing, Cedric" , "Christopherson, Sean J" , William Roberts , James Morris , "Serge E. Hallyn" , LSM List , Paul Moore , Eric Paris , "selinux@vger.kernel.org" , Jethro Beekman , "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: <20190603205405.GE4894@linux.intel.com> References: <960B34DE67B9E140824F1DCDEC400C0F654E965F@ORSMSX116.amr.corp.intel.com> <960B34DE67B9E140824F1DCDEC400C0F654E9824@ORSMSX116.amr.corp.intel.com> <20190528202407.GB13158@linux.intel.com> <285f279f-b500-27f0-ab42-fb1dbcc5ab18@tycho.nsa.gov> <960B34DE67B9E140824F1DCDEC400C0F654EB487@ORSMSX116.amr.corp.intel.com> <678a37af-797d-7bd5-a406-32548a270e3d@tycho.nsa.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 30, 2019 at 09:14:10AM -0700, Andy Lutomirski wrote: > > What is the "source file" i.e. the target of the check? Enclave file, > > sigstruct file, or /dev/sgx/enclave? > > Enclave file -- that is, the file backing the vma from which the data > is loaded. Wonder why KVM gets away without having this given that enclaves are lot alike VMs. > It's provided by userspace based on whether it thinks the data in > question is enclave code. source->vm_file is the file from which the > code is being loaded. I'm assuming that the user code will only set > excute_intent ==true if it actually wants to execute the code, so, if > there's a denial, it will be fatal. The normal case will be that the > request will be granted on the basis of EXECUTE. AFAIK user spaces tells that already with the SECINFO flags. I don't get why we need a duplicate parameter. /Jarkko