mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	michael.bishop@APPIQ.com, linux-kernel@vger.kernel.org,
	nickpiggin@yahoo.com.au
Subject: Re: More info for DSM w/r/t sunffb on 2.6.15-rc6
Date: Sat, 24 Dec 2005 09:16:48 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0512240909380.18709@goblin.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0512240029581.14098@g5.osdl.org>

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

  reply	other threads:[~2005-12-24  9:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-23 16:23 Michael Bishop
2005-12-23 19:19 ` David S. Miller
2005-12-23 20:53   ` Linus Torvalds
2005-12-23 23:45     ` David S. Miller
2005-12-24  1:21       ` Hugh Dickins
2005-12-24  7:46         ` David S. Miller
2005-12-24  9:07           ` Hugh Dickins
2006-03-21 10:28             ` David S. Miller
2005-12-24  8:32       ` Linus Torvalds
2005-12-24  9:16         ` Hugh Dickins [this message]
2005-12-24 20:08         ` David S. Miller
     [not found] <DF925A10E7204748977502BECE3D1123015C4DCE@exch02.appiq.com>
2005-12-24  8:29 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0512240909380.18709@goblin.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.bishop@APPIQ.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®