From owner-cvs-src-old@FreeBSD.ORG Tue Oct 27 10:16:12 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 036F31065697 for ; Tue, 27 Oct 2009 10:16:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E640E8FC12 for ; Tue, 27 Oct 2009 10:16:11 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9RAGBod075193 for ; Tue, 27 Oct 2009 10:16:11 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9RAGB9v075192 for cvs-src-old@freebsd.org; Tue, 27 Oct 2009 10:16:11 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200910271016.n9RAGB9v075192@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Tue, 27 Oct 2009 10:15:58 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/vm vm_fault.c vm_map.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 10:16:12 -0000 kib 2009-10-27 10:15:58 UTC FreeBSD src repository Modified files: sys/vm vm_fault.c vm_map.c Log: SVN rev 198505 on 2009-10-27 10:15:58Z by kib When protection of wired read-only mapping is changed to read-write, install new shadow object behind the map entry and copy the pages from the underlying objects to it. This makes the mprotect(2) call to actually perform the requested operation instead of silently do nothing and return success, that causes SIGSEGV on later write access to the mapping. Reuse vm_fault_copy_entry() to do the copying, modifying it to behave correctly when src_entry == dst_entry. Reviewed by: alc MFC after: 3 weeks Revision Changes Path 1.257 +46 -16 src/sys/vm/vm_fault.c 1.421 +10 -4 src/sys/vm/vm_map.c