From: "Jan Beulich" <jbeulich@novell.com>
To: "Jeremy Fitzhardinge" <jeremy@goop.org>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Xen-devel" <xen-devel@lists.xensource.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Nick Piggin" <nickpiggin@yahoo.com.au>
Subject: Re: [Xen-devel] [PATCH 2/2] x86: add pte_set_flags/clear_flags forpteflag manipulation
Date: Mon, 26 Jan 2009 07:51:24 +0000 [thread overview]
Message-ID: <497D798C.76E4.0078.0@novell.com> (raw)
In-Reply-To: <497A3117.2070809@goop.org>
>>> Jeremy Fitzhardinge <jeremy@goop.org> 23.01.09 22:05 >>>
>Jan Beulich wrote:
>> I think a comment (or event a BUG_ON()) should be added here to make
>> clear that this absolutely must not be used to toggle the present bit. I
>> even view toggling _PAGE_PSE as dangerous this way.
>>
>> And alternative would be to make these macros and #undef them (or keep
>> them inline functions but add destructive #define-s) after all their users.
>>
>
>I don't see any particular problem with changing PSE or even Present
>with these functions; they don't operate on live in-memory ptes, so its
>not like they could ever be used to modify a pte unless followed with
>some kind of set_pte operation. It is unwise to change any pte flag
>without knowing what you're doing (though P or PSE would probably have
>less subtle effects than some of the others).
Whether a pte is live doesn't matter here: If you change P on Xen, the
frame number representation *must* change from/to PFN to/from MFN.
In no case (other than iomem pages) is it allowed to flip just this bit.
Jan
WARNING: multiple messages have this Message-ID (diff)
From: "Jan Beulich" <jbeulich@novell.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Ingo Molnar <mingo@elte.hu>,
Xen-devel <xen-devel@lists.xensource.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] x86: add pte_set_flags/clear_flags forpteflag manipulation
Date: Mon, 26 Jan 2009 07:51:24 +0000 [thread overview]
Message-ID: <497D798C.76E4.0078.0@novell.com> (raw)
In-Reply-To: <497A3117.2070809@goop.org>
>>> Jeremy Fitzhardinge <jeremy@goop.org> 23.01.09 22:05 >>>
>Jan Beulich wrote:
>> I think a comment (or event a BUG_ON()) should be added here to make
>> clear that this absolutely must not be used to toggle the present bit. I
>> even view toggling _PAGE_PSE as dangerous this way.
>>
>> And alternative would be to make these macros and #undef them (or keep
>> them inline functions but add destructive #define-s) after all their users.
>>
>
>I don't see any particular problem with changing PSE or even Present
>with these functions; they don't operate on live in-memory ptes, so its
>not like they could ever be used to modify a pte unless followed with
>some kind of set_pte operation. It is unwise to change any pte flag
>without knowing what you're doing (though P or PSE would probably have
>less subtle effects than some of the others).
Whether a pte is live doesn't matter here: If you change P on Xen, the
frame number representation *must* change from/to PFN to/from MFN.
In no case (other than iomem pages) is it allowed to flip just this bit.
Jan
next prev parent reply other threads:[~2009-01-26 7:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-22 22:24 [PATCH 2/2] x86: add pte_set_flags/clear_flags for pte flag manipulation Jeremy Fitzhardinge
2009-01-23 8:14 ` [Xen-devel] [PATCH 2/2] x86: add pte_set_flags/clear_flags for pteflag manipulation Jan Beulich
2009-01-23 8:14 ` Jan Beulich
2009-01-23 21:05 ` [Xen-devel] " Jeremy Fitzhardinge
2009-01-23 21:05 ` Jeremy Fitzhardinge
2009-01-26 7:51 ` Jan Beulich [this message]
2009-01-26 7:51 ` [PATCH 2/2] x86: add pte_set_flags/clear_flags forpteflag manipulation Jan Beulich
2009-01-26 19:54 ` [Xen-devel] " Jeremy Fitzhardinge
2009-01-26 19:54 ` Jeremy Fitzhardinge
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=497D798C.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=xen-devel@lists.xensource.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 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.