xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen/x86: Remap text/data/bss with appropriate permissions
Date: Fri, 18 Mar 2016 01:25:14 -0600	[thread overview]
Message-ID: <56EBBB6A02000078000DE2F6@prv-mh.provo.novell.com> (raw)
In-Reply-To: <56EAD830.8090003@citrix.com>

>>> On 17.03.16 at 17:15, <andrew.cooper3@citrix.com> wrote:
> On 17/03/16 15:32, Jan Beulich wrote:
>>>>> On 17.03.16 at 15:44, <andrew.cooper3@citrix.com> wrote:
>>> On 17/03/16 14:31, Jan Beulich wrote:
>>>> Also - do we really want to make this code dependent on
>>>> map_pages_to_xen() not intermediately zapping the mappings
>>>> being changed?
>>> Do you mean "immediately"?
>> No.
>>
>>> As far as I can tell, it is guaranteed to be safe, even when remapping
>>> the code section.  Updates to the live pagetables are using atomic
>>> writes, and I didn't spot a point which would end up with a transient
>>> non-present mapping.
>> But we may, at some point and for whatever reason, come to make
>> the function zap the mapping (i.e. clear the present bit), flush, and
>> only the re-establish the new mapping.
> 
> This change is temporary until I can fix the legacy boot issue and
> reintroduce the proper 2M functionality.
> 
> If someone in the future wants to change the behaviour of
> map_pages_to_xen() then we can reconsider.  However, I think it is
> unlikely that this will actually happen at all, and if it ever does, I
> hope to have already fixed the 2M alignment and deleted this change.
> 
> This change is a big security improvement, and absolutely should be
> taken, especially as the current implementation of map_pages_to_xen() is
> safe.

I by no means intend to reject this change just because of this
aspect - I merely wanted to make the slight concern explicit.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-18  7:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 12:43 Andrew Cooper
2016-03-17 12:43 ` [PATCH] DO NOT APPLY - debug keys for inspecting Xen mappings Andrew Cooper
2016-03-17 14:31 ` [PATCH] xen/x86: Remap text/data/bss with appropriate permissions Jan Beulich
2016-03-17 14:44   ` Andrew Cooper
2016-03-17 15:32     ` Jan Beulich
2016-03-17 16:15       ` Andrew Cooper
2016-03-18  7:25         ` Jan Beulich [this message]
2016-03-18 19:49   ` [PATCH v2] " Andrew Cooper

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=56EBBB6A02000078000DE2F6@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH] xen/x86: Remap text/data/bss with appropriate permissions' \
    /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

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).