Date: Mon, 5 Apr 2004 17:43:32 -0700 From: Peter Wemm <peter@wemm.org> To: freebsd-current@freebsd.org Cc: Poul-Henning Kamp <phk@phk.freebsd.dk> Subject: Re: mmap breakage? Message-ID: <200404051743.32556.peter@wemm.org> In-Reply-To: <20040405045618.GA40623@kanpc.gte.com> References: <20040402191254.GK26131@elvis.mu.org> <20040405042010.GQ15786@cs.rice.edu> <20040405045618.GA40623@kanpc.gte.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 04 April 2004 09:56 pm, Alexander Kabaev wrote: > On Sun, Apr 04, 2004 at 11:20:10PM -0500, Alan Cox wrote: > > On Mon, Apr 05, 2004 at 12:11:47AM -0400, Alexander Kabaev wrote: > > > On Sun, Apr 04, 2004 at 03:12:51PM -0500, Alan Cox wrote: > > > > Alfred, > > > > > > > > Please try the attached patch. This problems appears to be a > > > > consequence of vm/vm_mmap.c revision 1.180, where as part of a > > > > much needed code reorganization for locking the check for the > > > > /dev/zero special case got placed after the permissions check > > > > for the general case. This patch simply delays the permissions > > > > check for devices until you have the necessary lock to also > > > > check for /dev/zero. > > > > > > > > Since kan@ authored the reorganization, I'm cc:'ing him on this > > > > message for purposes of obtaining a review. (At least one > > > > comment should be updated to reflect my code changes.) > > > > > > > > Regards, > > > > Alan > > > > > > Alan, Alfred, > > > > > > I had the following patch which is currently pending a review by > > > Peter Wemm. I meant to commit it on Friday, but ran out of time: > > > > > > > > > http://perforce.freebsd.org/chv.cgi?CH=50213 > > > > I believe that there is a problem with this patch. Specifically, > > if maxprot is set to VM_PROT_ALL for devices in mmap(), then the > > security check in vm_mmap_vnode() has no effect. Please take a > > look at the entirety of the changes that I propose to mmap(). > > > > Regards, > > Alan > > There is a problem indeed. I committed your (correct!) patch instead. > Thanks! Heh. Now I'm glad I suggested that you check with Alan :-) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404051743.32556.peter>