lkml.org 
[lkml]   [1998]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: How to read-protect a vm_area?
    Date
    In article <m0y3fyk-0005FsC@lightning.swansea.linux.org.uk>,
    Alan Cox <alan@lxorguk.ukuu.org.uk> 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
    mode.

    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").

    Linus

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu

    \
     
     \ /
      Last update: 2005-03-22 13:41    [W:0.022 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site