From mboxrd@z Thu Jan 1 00:00:00 1970 From: osalvador.vilardaga@gmail.com (Oscar Salvador) Date: Mon, 5 Sep 2016 12:59:46 +0200 Subject: check if a kernel page is read-only Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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