Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751146AbdFSQel (ORCPT ); Mon, 19 Jun 2017 12:34:41 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:40492 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbdFSQek (ORCPT ); Mon, 19 Jun 2017 12:34:40 -0400 Date: Mon, 19 Jun 2017 17:34:38 +0100 From: Al Viro To: linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: __user with scalar data types Message-ID: <20170619163438.GE10672@ZenIV.linux.org.uk> References: <20170619161509.GA25997@jcrouse-lnx.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170619161509.GA25997@jcrouse-lnx.qualcomm.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 665 Lines: 14 On Mon, Jun 19, 2017 at 10:15:09AM -0600, Jordan Crouse wrote: > Which raised a bikeshed debate over whether it is appropriate to mark a scalar > type as __user. My opinion is that it is appropriate because __user should mark > user memory regardless of the container. What the hell? __user is a qualifier like const, volatile, etc. It's a property of *pointer* *type*. Not some nebulous "marks userland memory" thing. > I'm looking for opinions or semi-authoritative edicts to determine if we should > either start changing our uapi headers or go off and try to figure out how to > make sparse understand this particular usage. Stop cargo-culting, please.