Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4794472ybi; Mon, 3 Jun 2019 17:57:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuLanD3Y+yOLcmuF2a3F+l4Ny7Gtmswn93c0bJ0Z2r9bXcQ3nPsHpUogN54OVkFYx6Y4lx X-Received: by 2002:a63:d4c:: with SMTP id 12mr32767162pgn.30.1559609820658; Mon, 03 Jun 2019 17:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559609820; cv=none; d=google.com; s=arc-20160816; b=gk3atw+5EbyUo3X6r9UFBsZK1R5may945qva8HECy5/FOlo+tf6MxHXMmJbueYDgYs w2BjPW083yVJnDgVVZIdlZrM/jFGGmPlx/KsFeZEGcsJ2OKGors/lVzClSSEtP1k/fqt UaN78mn5dfJumYoJlHl0fpOkDiM7pTJVovP8D6uXOqFXMXuOZz3vIpzs92O2qQl/w4Kj 4jUVATOB8X88wlL7MxYPC3hJWK9SrWisJfrkwTc92Uf3eCwxStrc3InLy4UuFykxlC4J SZ1RsUMRg4QTnk2GfXHksYtUOOTnycO9bdMA4sXUP8GMwdTJ/TFxrXcfDUr9y0/+/+RK Xurg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/nGWmKtxVVAEGhbiq7dL5czfqgy2VUzRZjWtV9b15xk=; b=PkxyC+JPDNr6n+kGFMePgr7Rd4q2Oi3V+rbXEYjIPgDpkT0g0LIPdAjtlR3kOC35At j1ipXCJ6b6gJFiEHNF5lOjGlv7GIMfIA68IyRXDWWYg4jjNnd8BQ6eo4fm7Vnyio+NVn ljjk0kPffpQVwRZQhY8OU8girRcCDbRd1CPv7t21jtDusPffvWhMJyqVUohdol+tLsuk FgNecLUO/iGG4bZSuShl0L4fIQ8rC936hIFRZV98Vfu+a4OyPzVsqbhKxqdp39shoIyr dJSItM60glbV6zp3Eh5zqCdhGXe/5j7CJbfM96Gr7vAp5/cHnCEL357LfUvzfZ/A4eIC 5jOA== 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 j15si21111332pgs.43.2019.06.03.17.56.44; Mon, 03 Jun 2019 17:57:00 -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 S1726616AbfFDAz0 (ORCPT + 99 others); Mon, 3 Jun 2019 20:55:26 -0400 Received: from mga14.intel.com ([192.55.52.115]:47292 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbfFDAz0 (ORCPT ); Mon, 3 Jun 2019 20:55:26 -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 fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 17:55:25 -0700 X-ExtLoop1: 1 Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.36]) by fmsmga006.fm.intel.com with ESMTP; 03 Jun 2019 17:55:24 -0700 Date: Mon, 3 Jun 2019 17:55:24 -0700 From: Sean Christopherson To: "Xing, Cedric" Cc: "Hansen, Dave" , Jarkko Sakkinen , Andy Lutomirski , Stephen Smalley , James Morris , "Serge E . Hallyn" , LSM List , Paul Moore , Eric Paris , "selinux@vger.kernel.org" , Jethro Beekman , Thomas Gleixner , 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 , "Roberts, William C" , "Tricca, Philip B" Subject: Re: [RFC PATCH 3/9] x86/sgx: Allow userspace to add multiple pages in single ioctl() Message-ID: <20190604005524.GB24521@linux.intel.com> References: <20190531233159.30992-1-sean.j.christopherson@intel.com> <20190531233159.30992-4-sean.j.christopherson@intel.com> <20190603203712.GI13384@linux.intel.com> <960B34DE67B9E140824F1DCDEC400C0F654ED499@ORSMSX116.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <960B34DE67B9E140824F1DCDEC400C0F654ED499@ORSMSX116.amr.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 03, 2019 at 04:48:47PM -0700, Xing, Cedric wrote: > > How about this for the intermediate patch: > > > > struct sgx_enclave_add_region { > > __u64 addr; > > __u64 src; > > __u64 size; > > __u64 secinfo; > > __u16 mrmask; > > __u16 reserved16; > > __u32 reserved; > > } > > > > and with the flags field: > > > > struct sgx_enclave_add_region { > > __u64 addr; > > __u64 src; > > __u64 size; > > __u64 secinfo; > > __u16 mrmask; > > __u16 flags; > > What is "flags" here? In the RFC, @flags holds SGX_ALLOW_{READ,WRITE,EXEC}. > > > __u32 reserved; > > }