[lkml]   [1998]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to read-protect a vm_area?
In article <>,
Alan Cox <> wrote:
>> I looked in an i386 book. It has a Present bit and a Read/Write bit as
>> part of its page protection system. I think it is simply not possible
>> to read-protect a page without swapping it!
>You just mark it "not present". Its up to you to remember its really around
>somewhere ;)

Actually, the way Linux does it is to mark it "supervisor mode only"
(clear the "US" bit) - which essentially read-protects it from user

If the original poster meant that you can't mark a page write-only
(protect it from reads but not from writes), then he's of course right
(you can do it by protecting the page and emulating any faulting write
instruction, but you can't do it "for real").


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to

 \ /
  Last update: 2005-03-22 13:41    [W:0.067 / U:0.580 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site