Re: More info for DSM w/r/t sunffb on 2.6.15-rc6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 24 Dec 2005, Linus Torvalds wrote:
> On Fri, 23 Dec 2005, David S. Miller wrote:
> >                                          
> > +	if (!(vma->vm_flags & VM_SHARED))
> > +		return -EINVAL;
> > +
> 
> Side note - as I explained to Nick the other week, VM_SHARED really means 
> "shared _writable_" mapping, so you're now disallowing a shared read-only 
> open too.
> 
> Which may be fine, of course. Especially if sbusfb always ends up giving a 
> writable pfn-mapping. But I wanted to check that that was what you meant 
> to do.
> 
> To test for MAP_SHARED, either do the is_cow_mapping() thing, or check 
> the VM_MAYSHARE bit.

I wondered over that too.  Concluded that at the moment it's right for
the test to be on VM_SHARED, because it's secretly giving away shared
write permission.  But in future, once that's been corrected, such checks
would do better to check for VM_MAYSHARE (i.e. reject all MAP_PRIVATE).

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux