From: osalvador.vilardaga@gmail.com (Oscar Salvador)
To: kernelnewbies@lists.kernelnewbies.org
Subject: check if a kernel page is read-only
Date: Mon, 5 Sep 2016 12:59:46 +0200 [thread overview]
Message-ID: <CAOXBz7iq1ww_YNMQEMHNhOxHnDhdQAgu6qKqERcW4Fs3YY2i6Q@mail.gmail.com> (raw)
Hi all,
I'm writing a module to read/write kernel memory, and for this I'd like to
check if a page is marked as read-only, so we don't have the right to write
there (kernel code for instance).
I though about the flags field from "struct page {}", but from the name I
can't see any useful flag to check this.
The only flag I saw is different between kernel code and module code is
that kernel code has the flag "reserved" enabled, so it's not swapped.
Could someone provide me a hint about that?
Thank you very much
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160905/6b48ef1a/attachment.html
next reply other threads:[~2016-09-05 10:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 10:59 Oscar Salvador [this message]
2016-09-05 11:46 ` check if a kernel page is read-only Oscar Salvador
2016-09-05 16:57 ` Valdis.Kletnieks at vt.edu
2016-09-06 8:24 ` Peter Senna Tschudin
2016-09-06 11:23 ` Oscar Salvador
2016-09-06 19:47 ` Valdis.Kletnieks at vt.edu
2016-09-07 13:47 ` Oscar Salvador
2016-09-07 15:38 ` Oscar Salvador
2016-09-07 16:48 ` Valdis.Kletnieks at vt.edu
2016-09-12 12:28 ` Oscar Salvador
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=CAOXBz7iq1ww_YNMQEMHNhOxHnDhdQAgu6qKqERcW4Fs3YY2i6Q@mail.gmail.com \
--to=osalvador.vilardaga@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).