All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: luto@kernel.org, linux-sgx@vger.kernel.org
Subject: Re: sgx_encl_may_map()
Date: Fri, 23 Aug 2019 13:37:09 -0700	[thread overview]
Message-ID: <20190823203709.GA24772@linux.intel.com> (raw)
In-Reply-To: <20190823150248.kuxgdxyd4z5wlsz5@linux.intel.com>

On Fri, Aug 23, 2019 at 06:02:48PM +0300, Jarkko Sakkinen wrote:
> 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.

You mean different vm_max_prot_bits?  I don't think we should deny
mapping a mix of R and RW pages with PROT_READ, e.g. map read-only but
have the option to make select pages writable in the future.

> 2. Why not require exact match with the PROT bits?

Toggling W in particular in the PTEs likely has value, e.g. initialize
data with runtime info and then lock the range in the PTEs.

  parent reply	other threads:[~2019-08-23 20:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Sean Christopherson [this message]
2019-08-26  2:56   ` sgx_encl_may_map() Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190823203709.GA24772@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-sgx@vger.kernel.org \
    --cc=luto@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.