From: Jidong Xiao <jidong.xiao@gmail.com>
To: linux-mm@kvack.org
Subject: How to really write-protect a page
Date: Tue, 14 Feb 2012 16:06:07 -0500 [thread overview]
Message-ID: <CAG4AFWYJXR-b8zDew+ia5xSCNJ2uZBhXvre6NxtMNVxtY9FsKg@mail.gmail.com> (raw)
Hi,
For some reason, I want to write protect a special page, but I don't
know how to set it as read-only.
I am reading the book "Understanding The Linux Virtual Memory Manager".
In section 5.6.4, there is saying:
"During fork, the PTEs of the two processes are made read-only so that
when a write occurs there will be a page fault. Linux recognises a COW
page because even though the PTE is write protected, the controlling
VMA shows the region is writable."
My question is, if I really want write protect a page, say, I don't
want a copy-on-write happens, I just hope the page is really
read-only, can I achieve that by setting "the controlling VMA" as
non-writable? Or how to do that?
Thank you!
Regards
Jidong
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2012-02-14 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAG4AFWYJXR-b8zDew+ia5xSCNJ2uZBhXvre6NxtMNVxtY9FsKg@mail.gmail.com \
--to=jidong.xiao@gmail.com \
--cc=linux-mm@kvack.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