linux-sgx.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sgx_encl_may_map()
@ 2019-08-23 15:02 Jarkko Sakkinen
  2019-08-23 16:04 ` sgx_encl_may_map() Jarkko Sakkinen
  2019-08-23 20:37 ` sgx_encl_may_map() Sean Christopherson
  0 siblings, 2 replies; 5+ messages in thread
From: Jarkko Sakkinen @ 2019-08-23 15:02 UTC (permalink / raw)
  To: sean.j.christopherson; +Cc: luto, linux-sgx

Hi

Couple of remarks that are not reasoned in the code too well:

1. Why to allow to mmap() to a range where pages have differing
   permissions? I think it would be better just to require all
   pages in a range to have the same permissions.
2. Why not require exact match with the PROT bits?
3. Why don't just store SECINFO flags on EADD? Doing
   calc_vma_prot_bits() on fly is not expensive. Now
   data in SECINFO flags is scattered to two different
   fields (desc and vm_max_prot_bits). I'd just have a field
   called secinfo_flags.

This came up when I noted that SGX_IOC_ENCLAVE_ADD_PAGE documentation
was not updated when this permission handling came up. I started to
do it but stumped into these questions. I also wonder why the API
documentation has not been updated...

/Jarkko

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-26  2:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 15:02 sgx_encl_may_map() Jarkko Sakkinen
2019-08-23 16:04 ` sgx_encl_may_map() Jarkko Sakkinen
2019-08-23 16:27   ` sgx_encl_may_map() Jarkko Sakkinen
2019-08-23 20:37 ` sgx_encl_may_map() Sean Christopherson
2019-08-26  2:56   ` sgx_encl_may_map() Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).