From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Add to_user_ptr() Date: Sun, 3 Mar 2013 19:50:47 +0100 Message-ID: <20130303185047.GR9021@phenom.ffwll.local> References: <1361542371-28432-1-git-send-email-ville.syrjala@linux.intel.com> <20130222142944.GD23278@cantiga.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B08FE5F00 for ; Sun, 3 Mar 2013 10:48:15 -0800 (PST) Received: by mail-wi0-f171.google.com with SMTP id hn17so1141420wib.16 for ; Sun, 03 Mar 2013 10:48:14 -0800 (PST) Content-Disposition: inline In-Reply-To: <20130222142944.GD23278@cantiga.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Feb 22, 2013 at 02:29:44PM +0000, Chris Wilson wrote: > On Fri, Feb 22, 2013 at 04:12:51PM +0200, ville.syrjala@linux.intel.com w= rote: > > From: Ville Syrj=E4l=E4 > > = > > to_user_ptr() simply casts a pointer passed as u64 from user space > > to void __user * correctly. Using this lets us get rid of all the > > tiresome casts. > > = > > The idea came from Chris Wilson . > > = > > Signed-off-by: Ville Syrj=E4l=E4 > Reviewed-by: Chris Wilson . Queued for -next, thanks for the patch. I do wonder whether we shouldn't push this as a more general solution as e.g. ioclt_u64_to_user_ptr. It should be best practice after all to use u64 for userpointers in ioctl structs ... Maybe send out an rfc to lkml cc a few people? -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch