linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	"security@kernel.org" <security@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Nick Piggin <npiggin@kernel.dk>
Subject: Re: [RFC PATCH (resend)] block layer zero-copy: missing access_ok() check
Date: Fri, 15 Mar 2013 14:07:52 -0400	[thread overview]
Message-ID: <20130315180752.GA3113@Krystal> (raw)
In-Reply-To: <CA+55aFy3zUrDL-G+CD2gEJEoG100k56HArKbCrGnQEFCofXcPQ@mail.gmail.com>

* Linus Torvalds (torvalds@linux-foundation.org) wrote:
> On Fri, Mar 15, 2013 at 11:01 AM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > get_user_pages() does check permissions. It looks up the vma and
> > checks them there, which is much more than access_ok() ever does.
> 
> To clarify: the fact that a vma exists at all already means "it's a
> user mapping" (with the special gate area being a secondary user
> mapping). So you don't need any kind of explicit user check.

Ah! That's the bit I was missing.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2013-03-15 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130315133748.GA31887@Krystal>
     [not found] ` <20130315152326.GM31875@kernel.dk>
     [not found]   ` <20130315155808.GB1659@Krystal>
     [not found]     ` <CA+55aFxW0vkpgJCpJVJVqDmDG61P_AOoVMFVhfqVxM45Mj-LNA@mail.gmail.com>
     [not found]       ` <20130315171000.GA2342@Krystal>
2013-03-15 17:21         ` [RFC PATCH (resend)] block layer zero-copy: missing access_ok() check Linus Torvalds
2013-03-15 17:57           ` Mathieu Desnoyers
2013-03-15 18:01             ` Linus Torvalds
2013-03-15 18:04               ` Linus Torvalds
2013-03-15 18:07                 ` Mathieu Desnoyers [this message]
2013-03-18  6:51           ` Benjamin Herrenschmidt
2013-03-21 21:33           ` David Miller

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=20130315180752.GA3113@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    --cc=security@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).