Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp434736yba; Wed, 15 May 2019 04:03:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+0ehvgJqYgbtxDO/oY6DZ1p6t5n8o208WdlkuhLO6sY/WYS9+T9W9ia1GIzumg8gh75Aa X-Received: by 2002:a63:e24c:: with SMTP id y12mr19715363pgj.276.1557918227379; Wed, 15 May 2019 04:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557918227; cv=none; d=google.com; s=arc-20160816; b=vtufGMtnYObWbLkPGtuWz4fPwPm2PYTDCAHFVr1ppjKfIkRDSoAE0m8Iju2WbeL+Cr aWxsb5Hx1VEVeKBC/Kq6YCT1zQklj2Js4VKFcfhDJ0hg4IzghZaBr4HuL8KeDM1O212Z HkOPbOdq7wKMPQneWOHzYEiOyVlXPjnMVkXLudwSs1cLVfZbabi6xqvUk74c2nItJ47p WSEW+RD86UfJaqhgyhj8F6YJhggB7NneoNKfd9Ve8Q+Y3Yu+nc7Qj6D2AGVDvSLI+ATh p3TLlOFdrKdyTs8YDAzM/6hcLO4eLtwp2h/LtJl6SiRLx91SQc5R43jjIf/OKgnbsj0S OQwA== 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=UI1uk0tf6IG6EBSCh2SJxDN6Jw5MVlO9MKnrErseBrU=; b=OEUm3jG3ruR2kxtKlWtxGJYY46/bzSVzWygEoMB21HOJaaads46Q1Rt+Mm4Rn5XdiR tBF5z6C12OEGiFneD2jgsOO/X93OAVZB9IDS+U06bzUsLG3jvcqo19PlJGm69YljN7K9 jAFv6Xi49RGoYn0DmrSWUg5pOsqNLcsBgzNkoiG/u6Mgha9zWGLwtB15Ys8tUvElszYC 5AwdP+dGvulbzuloS1Y9MfAlTNBNgwtAo8NGCbSbWQha/MseItnegDPOBwl7FsE2hexd CPkJJYh/LsfC5cJNSF+QWYh9V4+I/FSt4UjhNj/v1ZOz+ZLtNWZEFz5KepMb0rRbwMva B92A== 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 q14si1496131pgg.521.2019.05.15.04.03.22; Wed, 15 May 2019 04:03:47 -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 S1727338AbfEOLAE (ORCPT + 99 others); Wed, 15 May 2019 07:00:04 -0400 Received: from mga11.intel.com ([192.55.52.93]:37157 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727316AbfEOLAC (ORCPT ); Wed, 15 May 2019 07:00:02 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2019 04:00:02 -0700 X-ExtLoop1: 1 Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.189]) by fmsmga006.fm.intel.com with ESMTP; 15 May 2019 03:59:56 -0700 Date: Wed, 15 May 2019 14:00:05 +0300 From: Jarkko Sakkinen To: Sean Christopherson Cc: Andy Lutomirski , 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: [PATCH v20 00/28] Intel SGX1 support Message-ID: <20190515110005.GA14718@linux.intel.com> References: <8fe520bb-30bd-f246-a3d8-c5443e47a014@intel.com> <358e9b36-230f-eb18-efdb-b472be8438b4@fortanix.com> <960B34DE67B9E140824F1DCDEC400C0F4E886094@ORSMSX116.amr.corp.intel.com> <6da269d8-7ebb-4177-b6a7-50cc5b435cf4@fortanix.com> <20190513102926.GD8743@linux.intel.com> <20190514104323.GA7591@linux.intel.com> <20190514204527.GC1977@linux.intel.com> <20190515103531.GB10917@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190515103531.GB10917@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 Wed, May 15, 2019 at 01:35:31PM +0300, Jarkko Sakkinen wrote: > This brings me to an open question in Andy's model: lets say that we > change the source for SIGSTRUCT from memory address to fd. How can the > policy prevent the use not creating a file containing a SIGSTRUCT and > passing fd of that to the EINIT ioctl? Also wondering if a path would be better than plain fd for defining a reasonable policy i.e. have sigstruct_path as part of the ioctl parameters and not sigstruct_fd. /Jarkko