From: Arjan van de Ven <arjan@infradead.org>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Query about set_pages_* API
Date: Sat, 9 Feb 2008 15:57:07 -0800 [thread overview]
Message-ID: <20080209155707.787ddc47@laptopd505.fenrus.org> (raw)
In-Reply-To: <47AE2BCC.3040605@lwfinger.net>
On Sat, 09 Feb 2008 15:40:12 -0700
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> I'm trying to modify the VirtualBox kernel module to work with
> 2.6.24-git (and 2.6.25) on x86_64 architecture. The current code has
> a value of the third argument of the call (prot) with 3 variants. All
> variations have the following bits set: _PAGE_PRESENT, _PAGE_RW,
> _PAGE_DIRTY, and _PAGE_ACCESSED. Number 2 adds _PAGE_NX to the above,
> and number 3 adds _PAGE_GLOBAL to the bits in variation 1.
>
> From the code in arch/x86/mm/pageattr.c, I figured I need to call
> set_pages_wb() unconditionally, and set_pages_nx() if _PAGE_NX is
> set. Will these calls be sufficient? I thought about calling
> set_pages_rw(), but that entry is not exported.
it depends on what the code is trying to achieve.
(this makes it not a trivial 1:1 scripted replacement ;-)
Which attribute is the code trying to change? Is it trying to make
a piece of code (non) cachable? or executable? You need to figure out what
the intent is..
next prev parent reply other threads:[~2008-02-09 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 22:40 Larry Finger
2008-02-09 23:57 ` Arjan van de Ven [this message]
2008-02-10 0:00 ` Arjan van de Ven
2008-02-10 17:15 ` Larry Finger
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=20080209155707.787ddc47@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®