Re: [PATCH v23 12/24] x86/sgx: Linux Enclave Driver

From
Jarkko Sakkinen <hidden>
Date
2019-11-08 08:05:16
Also in
lkml
Reply to
Stephen Smalley, 2019-11-01
On Fri, Nov 01, 2019 at 01:16:59PM -0400, Stephen Smalley wrote:
On 11/1/19 11:32 AM, Sean Christopherson wrote:
quoted
On Fri, Nov 01, 2019 at 09:28:17AM -0400, Stephen Smalley wrote:
quoted
On 11/1/19 9:16 AM, Stephen Smalley wrote:
quoted
So, IIUC, that means that merging the driver will create a regression with
respect to LSM control over executable mappings that will only be
rectified at some future point in time if/when someone submits LSM hooks
or calls to existing hooks to restore such control.  That doesn't seem
like a good idea.  Why can't you include at least that basic level of
control now?  It is one thing to defer finer grained control or
SGX-specific access controls to the future - that I can understand.  But
introducing a regression in the existing controls is not really ok.
Unless you are arguing that the existing checks on mmap/mprotect of
/dev/sgx/enclave are a coarse-grained approximation (effectively requiring
WX to the file or execmem for any user of SGX).
Yes, that's the argument as running any enclave will require RWX access to
/dev/sgx/enclave.  EXECMEM won't trigger for SGX users as /dev/sgx/enclave
must be MAP_SHARED and it's a non-private file (not backed by anonymous
inode, in case I got the file terminology wrong).
Ok, so for SELinux's purposes, one will need to allow :file { open ioctl map
read write execute } to whatever type is ultimately assigned to
/dev/sgx/enclave in order to use SGX.
AFAIK yes.

/Jarkko
Thread (18 messages) 18 messages, 4 authors, last reply 2019-12-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help