• Andrew Morton's avatar
    [PATCH] prevent ptrace from altering page permissions · c03544dd
    Andrew Morton authored
    From: Roland McGrath <roland@redhat.com>
    
    Under some circumstances, ptrace PEEK/POKE_TEXT can cause page permissions
    to be permanently changed.  Thsi causes changes in application behaviour
    when run under gdb.
    
    Fix that by only marking the pte as writeable if the vma is marked for
    writing.  A write fault thus unshares the page but doesn't necessarily make
    it writeable.
    c03544dd
memory.c 44.8 KB