lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/2] x86: sgx_vepc: implement SGX_IOC_VEPC_REMOVE ioctl
From
On 12/10/21 18:57, Jarkko Sakkinen wrote:
>> +
>>  static const struct file_operations sgx_vepc_fops = {
>>         .owner          = THIS_MODULE,
>>         .open           = sgx_vepc_open,
>> +       .unlocked_ioctl = sgx_vepc_ioctl,
>> +       .compat_ioctl   = sgx_vepc_ioctl,
>>         .release        = sgx_vepc_release,
>>         .mmap           = sgx_vepc_mmap,
>>  };
> I went through this a few times, the code change is sound and
> reasoning makes sense in the commit message.
>
> The only thing that I think that is IMHO lacking is a simple
> kselftest. I think a trivial test for SGX_IOC_VEP_REMOVE_ALL
> would do.

Yeah, a trivial test wouldn't cover a lot; it would be much better to at
least set up a SECS, and check that the first call returns 1 and the
second returns 0. There is no existing test for /dev/sgx_vepc at all.

Right now I'm relying on Yang for testing this in QEMU, but I'll look
into adding a selftest that does the full setup and runs an enclave in a
guest.

Paolo

\
 
 \ /
  Last update: 2021-10-12 19:04    [W:0.081 / U:21.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site