lkml.org 
[lkml]   [2021]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Subject: [PATCH 0/1] SGX self test fails
On Thu, Apr 29, 2021 at 12:39:51PM -0600, Tim Gardner wrote:
> I'm just starting my learning curve on SGX, so I don't know if I've missed
> some setup for the SGX device entries. After looking at arch/x86/kernel/cpu/sgx/driver.c
> I see that there is no mode value for either sgx_dev_enclave or sgx_dev_provision.

Take a look at

https://github.com/systemd/systemd/pull/18944

> With this patch I can get the SGX self test to complete:
>
> sudo ./test_sgx
> Warning: no execute permissions on device file /dev/sgx_enclave
> 0x0000000000000000 0x0000000000002000 0x03
> 0x0000000000002000 0x0000000000001000 0x05
> 0x0000000000003000 0x0000000000003000 0x03
> SUCCESS
>
> Is the warning even necessary ?
>
> Tim

With a quick look, I think that check is too strict. AFAIK, mmap(PROT_EXEC)
can be done, as long as the file is not in a noexec FS.

Dave?

For reference:

https://lore.kernel.org/linux-sgx/20210318194301.11D9A984@viggo.jf.intel.com/

/Jarkko

\
 
 \ /
  Last update: 2021-05-03 17:39    [W:0.061 / U:2.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site