From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [RFC PATCH (resend)] block layer zero-copy: missing access_ok() check Date: Fri, 15 Mar 2013 14:07:52 -0400 Message-ID: <20130315180752.GA3113@Krystal> References: <20130315133748.GA31887@Krystal> <20130315152326.GM31875@kernel.dk> <20130315155808.GB1659@Krystal> <20130315171000.GA2342@Krystal> <20130315175710.GA2748@Krystal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail.openrapids.net ([64.15.138.104]:48826 "EHLO blackscsi.openrapids.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750920Ab3COSHx (ORCPT ); Fri, 15 Mar 2013 14:07:53 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: "linux-arch@vger.kernel.org" , Jens Axboe , "security@kernel.org" , Greg Kroah-Hartman , Al Viro , Nick Piggin * Linus Torvalds (torvalds@linux-foundation.org) wrote: > On Fri, Mar 15, 2013 at 11:01 AM, Linus Torvalds > 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