From owner-freebsd-hackers Tue Nov 30 23:28:50 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id B3EFE14E90 for ; Tue, 30 Nov 1999 23:28:48 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id XAA29886; Tue, 30 Nov 1999 23:28:44 -0800 (PST) (envelope-from dillon) Date: Tue, 30 Nov 1999 23:28:44 -0800 (PST) From: Matthew Dillon Message-Id: <199912010728.XAA29886@apollo.backplane.com> To: "Brian J. McGovern" Cc: hackers@FreeBSD.ORG Subject: Re: writing to an mmap()'ed region requires read access? References: <199912010444.XAA17911@spoon.beta.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :I was just playing with mmap() really for the first time, and I noticed :something a bit odd. When you mmap() a file for writing, it also appears :to require that you give it read permissions, else it dies on a signal 10. :Any reason for this? (I'm using 3.3-STABLE (11/30/99) with the following :program) : -Brian I've got a few hundred terrabytes of WOM to sell ya! This is just a byproduct of the MMU implementation. Most MMU's do not support write-only maps because most do not implement separate read and write bits. You get a valid and a write-enable bit instead, or you just get a valid bit and have to use the dirty bit to make the page writable (no write-enable bit at all). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message