lkml.org 
[lkml]   [2019]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/9] x86/sgx: Allow userspace to add multiple pages in single ioctl()
From
Date
On 5/31/19 4:31 PM, Sean Christopherson wrote:
> -struct sgx_enclave_add_page {
> +struct sgx_enclave_add_pages {
> __u64 addr;
> __u64 src;
> __u64 secinfo;
> + __u32 nr_pages;
> __u16 mrmask;
> } __attribute__((__packed__));

IMNHO this follows a user interface anti-pattern: exposing page sizes
where not strictly required.

Think of how this would look to an application if page size was
variable. With this interface, they always need to scale their
operations by page size instead of just aligning it.

BTW, why is nr_pages a u32? Do we never envision a case where you can
add more than 4TB of memory to an enclave? ;)

\
 
 \ /
  Last update: 2019-06-03 22:15    [W:0.356 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site