Re: mmap breakage?

From: Alexander Kabaev (ak03_at_gte.com)
Date: 04/05/04

  • Next message: Ganbold: "Re: FBSD 5.2.1-p4 and mysqld problems [RESOLVED]"
    Date: Mon, 5 Apr 2004 00:56:18 -0400
    To: Alan Cox <alc@cs.rice.edu>
    
    

    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!

    -- 
    Alexander Kabaev
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Ganbold: "Re: FBSD 5.2.1-p4 and mysqld problems [RESOLVED]"

    Relevant Pages

    • Re: TMPFS over NFSv4
      ... On Mon, 24 May 2010, Alan Cox wrote: ... If patch conflicts are a problem, you really only need to put in the ... what does Alan means by "strict overcommit"? ... static inline void shmem_unacct_size(unsigned long flags, ...
      (Linux-Kernel)
    • Re: [PATCH] sound_core.c: Remove BKL from soundcore_open
      ... On Sun, 11 Oct 2009, Frederic Weisbecker wrote: ... [PATCH] This code is already protected by spin_lock, and doesn't require the bkl ... Never-the-less here is version 3 of the patch - like Alan suggested, ...
      (Linux-Kernel)
    • [PATCH] blktrace: from-sector redundant in trace_block_remap, fix
      ... I reviewed the older version of this patch, but didn't review it again when ... Alan sent out this revised one, and I just found a typo in it... ... Subject: [PATCH] blktrace: from-sector redundant in trace_block_remap, ...
      (Linux-Kernel)
    • Re: [i2c] [PATCH] i2c: Push ioctl BKL down into the i2c code
      ... > Hi Alan, ... > Description of what the patch does and why it is needed, ... to do with these patches and they don't follow lkml. ... that we can work on getting rid of the big kernel lock for good. ...
      (Linux-Kernel)
    • Re: Three million hit by Windows worm
      ... Alan wrote: ... The moral of the story "PATCH THE MACHINE" ... Or don't use Micro$oft software for your Internet connections, email, ... newsgroups, firewall etc. ...
      (uk.telecom.broadband)