Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbdFTIhK (ORCPT ); Tue, 20 Jun 2017 04:37:10 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:36603 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbdFTIhH (ORCPT ); Tue, 20 Jun 2017 04:37:07 -0400 MIME-Version: 1.0 X-Originating-IP: [2a02:168:5640:0:960b:2678:e223:c1c6] In-Reply-To: <1497944521.16795.2.camel@redhat.com> References: <20170619161509.GA25997@jcrouse-lnx.qualcomm.com> <20170619163438.GE10672@ZenIV.linux.org.uk> <1497944521.16795.2.camel@redhat.com> From: Daniel Vetter Date: Tue, 20 Jun 2017 10:37:06 +0200 X-Google-Sender-Auth: 8lk2lA2Cbn0sFFf3Y_Ey9du4-6M Message-ID: Subject: Re: __user with scalar data types To: Gerd Hoffmann Cc: Al Viro , "Clark, Rob" , linux-sparse@vger.kernel.org, Linux Kernel Mailing List , dri-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 698 Lines: 21 On Tue, Jun 20, 2017 at 9:42 AM, Gerd Hoffmann wrote: >> Yep that's cargo-culted, but from a quick grep only msm and qxl >> headers do this (the other __user annotations in uapi/drm are for >> pointers, where it's correct). Adding those maintainers. > > Yep, those looks pointless indeed. > >> Also, if you use u64_to_user_ptr helper macro sparse should have >> caught this (if not we'd need to improve the macro). > > And qxl should actually use it. > > Fix attached (compile-tested only so far), does that look ok? Yup. Assuming sparse is happy: Acked-by: me. Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch