From owner-freebsd-hackers Sat Sep 27 16:19:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA19538 for hackers-outgoing; Sat, 27 Sep 1997 16:19:27 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA19529 for ; Sat, 27 Sep 1997 16:19:10 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.8.6/8.8.5) id SAA12614; Sat, 27 Sep 1997 18:19:02 -0500 (EST) From: "John S. Dyson" Message-Id: <199709272319.SAA12614@dyson.iquest.net> Subject: Re: using vm_map_protect on Pentium PC In-Reply-To: <199709270523.BAA07578@singapore.eecs.umich.edu> from Wee Teck Ng at "Sep 27, 97 01:23:44 am" To: weeteck@eecs.umich.edu (Wee Teck Ng) Date: Sat, 27 Sep 1997 18:19:02 -0500 (EST) Cc: freebsd-hackers@FreeBSD.ORG Reply-To: dyson@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Wee Teck Ng said: > hi all, > > we are heavily utilising VM protection (vm_map_prot) on 2.2-stable, > and found that it doesn't work well on Pentium processor. specifically, > when using vm_map_prot to change a page's protection from VM_PROT_READ > to VM_PROT_ALL, only the vm map is updated. > That should be okay. > > pmap_protect does not reset > the pte to writeable (i.e. PG_RW). this will not work on pentium processor, > since page level protection is enforced by the processor (against kernel > access) when WP flag of CR0 is set. > > i've noticed that FreeBSD-current has fixed this problem. my questions are: > 1) is there a 2.x release with a Pentium-compatible VM system? > 2) how stable is 3.0 is for non SMP machines? > Actually, the VM system uses lazy techniques. As soon as you cause a (write) fault, the page SHOULD have it's protections corrected. -- John dyson@freebsd.org jdyson@nc.com