lkml.org 
[lkml]   [2019]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [RFC PATCH 6/9] x86/sgx: Require userspace to provide allowed prots to ADD_PAGES
    Date
    > From: Christopherson, Sean J
    > Sent: Saturday, June 01, 2019 02:32
    >
    > /**
    > * struct sgx_enclave_add_pages - parameter structure for the
    > * %SGX_IOC_ENCLAVE_ADD_PAGES ioctl
    > @@ -39,6 +44,7 @@ struct sgx_enclave_create {
    > * @secinfo: address for the SECINFO data (common to all pages)
    > * @nr_pages: number of pages (must be virtually contiguous)
    > * @mrmask: bitmask for the measured 256 byte chunks (common to all
    > pages)
    > + * @flags: flags, e.g. SGX_ALLOW_{READ,WRITE,EXEC} (common to all
    > pages)
    > */
    > struct sgx_enclave_add_pages {
    > __u64 addr;
    > @@ -46,7 +52,8 @@ struct sgx_enclave_add_pages {
    > __u64 secinfo;
    > __u32 nr_pages;
    > __u16 mrmask;
    > -} __attribute__((__packed__));
    > + __u16 flags;
    > +};

    You are adding a flags member. The secinfo structure has already a flags member in it.
    Why do you need both - they are both coming from user mode. What kind of scenario would
    require having different values. Seems confusing.

    ---------------------------------------------------------------------
    Intel Israel (74) Limited

    This e-mail and any attachments may contain confidential material for
    the sole use of the intended recipient(s). Any review or distribution
    by others is strictly prohibited. If you are not the intended
    recipient, please contact the sender and delete all copies.

    \
     
     \ /
      Last update: 2019-06-05 13:11    [W:4.152 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site