Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757490AbdLQRb1 (ORCPT ); Sun, 17 Dec 2017 12:31:27 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:43572 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757373AbdLQRb0 (ORCPT ); Sun, 17 Dec 2017 12:31:26 -0500 Date: Sun, 17 Dec 2017 17:31:24 +0000 From: Al Viro To: Luc Van Oostenryck Cc: Christophe Leroy , linux-kernel@vger.kernel.org Subject: Re: [PATCH] lib/usercopy: fix sparse errors Message-ID: <20171217173124.GN21978@ZenIV.linux.org.uk> References: <20171209162424.E5CEF41C4C@localhost.localdomain> <20171217172139.uytoormlzryy7pu5@ltop.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171217172139.uytoormlzryy7pu5@ltop.local> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 682 Lines: 17 > The change is good. > The commit message would better simply describe the problem instead > of describing the symptom. For example, something like: > The function _copy_to_user() is used to copy to address space. > As such, the destination pointer should be annotated with > '__user'. > However, the function has the annotation wrongly, on the > source instead of the destination (copy & paste error?). > Fix this by moving the __user annotation to the correct > argument. FWIW, I've committed it with Fix misannotated out-of-line _copy_to_user() Destination is a kernel pointer and source - a userland one is _copy_from_user(); _copy_to_user() is the other way round.