Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp525496imm; Fri, 31 Aug 2018 06:44:43 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda/++hTdQCFu2tMyAcoG3Rmf8/QxoTFLipa/H1jgT6jm2+4YL59vOTiVSyfrSxTZBu8P1Is X-Received: by 2002:a17:902:b60e:: with SMTP id b14-v6mr15410268pls.111.1535723083865; Fri, 31 Aug 2018 06:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535723083; cv=none; d=google.com; s=arc-20160816; b=hjI5nWN6z1JugRRX11yxs+4RBSB9Vxir8zZoUEjLhqCdavFdtqe+/OLZ96txHjroKL QdVtAgUHvwa3fM7ffN+MLnIaWYDV2FAbVZjg6doXZDx6+km57QNHpY1j5VUNsCzM0NCO I3ZUsu1H6eD03VffDAP5gzZn1KDC11V3gcSMEmQL2fkDe7jUxPBHyezHeJbchopbl9pz m3iS/Uh2oawseoAVwzPMbwHZbSoeQhbEkC6+XMbIZn4EhltHvqScuv4jPiBSej2f6WF1 NZfkNSE0yoyQGpVfk7TM3F+8pN/faqwA8vG/RopDt2UC0AIXr1BNPzjrexfkOKVWJW6r lamQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6t7vZqqgW9IKtXxKwH7XDaHsi1md78lhgkXt2Li34y8=; b=A4LzmqNnuzAp5YlfkLDIjKd6kOpMegXfgzC+BJMvGNxroqjY9sNxFU1qKgOgTaPqBi pBFNaouTfdcVE7xT9+mvEZSPTlSr86j5DCRJRVEdp8vlm2r5fq2uQ8fqbJhILgizuWql YnyuqCW7Xck68pWXKVBehHhC8rXng3e4rhzqBVqUA5nXBRX+MHZBJg9xfXu1p0KRuwCg evwhczecv5MJea+foARqsxkkMAgVuutJSmxfhf9IHE4kHO4IekzRaNqmWX7ZJwLz7arc xiuHQmFtXk0RRClhKrUnmWsl9cPx7oOr0enNZYWD/29dpxMeYzZZlMcNCvV2Wo+WcXVw dakg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si1401887pgm.399.2018.08.31.06.44.28; Fri, 31 Aug 2018 06:44:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728577AbeHaRuf (ORCPT + 99 others); Fri, 31 Aug 2018 13:50:35 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:58766 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727475AbeHaRuf (ORCPT ); Fri, 31 Aug 2018 13:50:35 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fvjhF-00006h-0B; Fri, 31 Aug 2018 13:42:45 +0000 Date: Fri, 31 Aug 2018 14:42:44 +0100 From: Al Viro To: Luc Van Oostenryck Cc: Andrey Konovalov , Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Chintan Pandya Subject: Re: [PATCH v6 11/11] arm64: annotate user pointers casts detected by sparse Message-ID: <20180831134244.GB19965@ZenIV.linux.org.uk> References: <5d54526e5ff2e5ad63d0dfdd9ab17cf359afa4f2.1535629099.git.andreyknvl@google.com> <20180831081123.6mo62xnk54pvlxmc@ltop.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831081123.6mo62xnk54pvlxmc@ltop.local> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 31, 2018 at 10:11:24AM +0200, Luc Van Oostenryck wrote: > On Thu, Aug 30, 2018 at 01:41:16PM +0200, Andrey Konovalov wrote: > > This patch adds __force annotations for __user pointers casts detected by > > sparse with the -Wcast-from-as flag enabled (added in [1]). > > > > [1] https://github.com/lucvoo/sparse-dev/commit/5f960cb10f56ec2017c128ef9d16060e0145f292 > > Hi, > > It would be nice to have some explanation for why these added __force > are useful. It would be even more useful if that series would either deal with the noise for real ("that's what we intend here, that's what we intend there, here's a primitive for such-and-such kind of cases, here we actually ought to pass __user pointer instead of unsigned long", etc.) or left it unmasked. As it is, __force says only one thing: "I know the code is doing the right thing here". That belongs in primitives, and I do *not* mean the #define cast_to_ulong(x) ((__force unsigned long)(x)) kind. Folks, if you don't want to deal with that - leave the warnings be. They do carry more information than "someone has slapped __force in that place". Al, very annoyed by that kind of information-hiding crap...