[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: vm_map_protect / pmap_protect Can't lower protection
From:       Andrey Simonenko <simon () comsys ! ntu-kpi ! kiev ! ua>
Date:       2009-07-28 15:55:38
Message-ID: 20090728155538.GA77306 () pm513-1 ! comsys ! ntu-kpi ! kiev ! ua
[Download RAW message or body]

Hello Andrew,

On Mon, Jul 20, 2009 at 04:14:02PM +0100, Andrew Brampton wrote:

> However, memguard_unguard doesn't work correctly. It first calls
> vm_map_protect with a read-write flag.
> vm_map_protect correctly updates the vm_map_entry, and then calls
> pmap_protect to set the actual pte.
> pmap_protect is lazy and notices that we are reducing the protection
> on the page and therefore does nothing. It assumes that later that a
> page fault will occur, call vm_fault, and then fix up the pte then.

As I remember, pmap_protect() is used for removing permissions, it
cannot be used (even in initial versions of pmap code) for lowering
permissions.  pmap_enter() can be used to lower permissions, this
is even written in its comments.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic