[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3QatXPYgDzZkUpxwHh5HJw5-XWA6VoyxW6Y9UAnzS=tQ@mail.gmail.com>
Date: Thu, 20 Dec 2018 13:08:46 +0100
From: Arnd Bergmann <arnd@...db.de>
To: jethro@...tanix.com
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"the arch/x86 maintainers" <x86@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
sean.j.christopherson@...el.com, "H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-sgx@...r.kernel.org, Andy Lutomirski <luto@...capital.net>,
Josh Triplett <josh@...htriplett.org>,
haitao.huang@...ux.intel.com, greg@...ellic.com
Subject: Re: x86/sgx: uapi change proposal
On Wed, Dec 19, 2018 at 10:26 AM Jethro Beekman <jethro@...tanix.com> wrote:
>
> On 2018-12-19 13:28, Jarkko Sakkinen wrote:
> > /**
> > * struct sgx_enclave_add_page - parameter structure for the
> > * %SGX_IOC_ENCLAVE_ADD_PAGE ioctl
> > * @eclave_fd: file handle to the enclave address space
> > * @src: address for the page data
> > * @secinfo: address for the SECINFO data
> > * @mrmask: bitmask for the measured 256 byte chunks
> > */
> > struct sgx_enclave_add_page {
> > __u64 enclave_fd;
> > __u64 src;
> > __u64 secinfo;
> > __u16 mrmask;
> > } __attribute__((__packed__));
>
> Wouldn't you just pass enclave_fd as the ioctl fd parameter?
>
> How to specify the address of the page that is being added?
One more comment about the structure: I would generally recommend
against packing structures like this. Instead just extend the mrmask
member to 64 bits as well.
Arnd
Powered by blists - more mailing lists