From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: linux-sgx@vger.kernel.org
Subject: Re: mmap(), #PF handler and EADD interaction
Date: Wed, 21 Aug 2019 21:15:43 +0300 [thread overview]
Message-ID: <20190821181543.uwvtlcoh2t5nb6ta@linux.intel.com> (raw)
In-Reply-To: <20190819175420.GA1916@linux.intel.com>
On Mon, Aug 19, 2019 at 10:54:21AM -0700, Sean Christopherson wrote:
> On Mon, Aug 19, 2019 at 06:24:31PM +0300, Jarkko Sakkinen wrote:
> > I did some backtracking today how the permission flow worked.
> >
> > With the maximum VM flags defined for a page, what if EADD is done after
> > mmap()? E.g. we first do mmap() with RWX and later EADD with lets say
> > RW.
>
> sgx_encl_may_map() returns -EACCESS on any attempt to mmap()/mprotect() a
> range that is not fully covered by EADD'd pages with any of PROT_READ,
> PROT_WRITE or PROT_EXEC. This is handled in the !page check below.
Aah so it was. Can you send me a patch to extend the kdoc with
additional paragraph to remark this?
/Jarkko
prev parent reply other threads:[~2019-08-21 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 15:24 mmap(), #PF handler and EADD interaction Jarkko Sakkinen
2019-08-19 17:54 ` Sean Christopherson
2019-08-21 18:15 ` Jarkko Sakkinen [this message]
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=20190821181543.uwvtlcoh2t5nb6ta@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=linux-sgx@vger.kernel.org \
--cc=sean.j.christopherson@intel.com \
/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 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).