From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6022C4167B for ; Fri, 18 Feb 2022 02:21:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39B3B6B0074; Thu, 17 Feb 2022 21:21:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 34AD46B0075; Thu, 17 Feb 2022 21:21:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 211CA6B0078; Thu, 17 Feb 2022 21:21:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 124A16B0074 for ; Thu, 17 Feb 2022 21:21:10 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C2CBF9A266 for ; Fri, 18 Feb 2022 02:21:09 +0000 (UTC) X-FDA: 79154298258.29.54E184D Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [142.44.231.140]) by imf16.hostedemail.com (Postfix) with ESMTP id 4C54D180002 for ; Fri, 18 Feb 2022 02:21:09 +0000 (UTC) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKstJ-002dCt-8P; Fri, 18 Feb 2022 02:21:01 +0000 Date: Fri, 18 Feb 2022 02:21:01 +0000 From: Al Viro To: Arnd Bergmann Cc: Christophe Leroy , Linus Torvalds , Christoph Hellwig , "linux-arch@vger.kernel.org" , "linux-mm@kvack.org" , "linux-api@vger.kernel.org" , "arnd@arndb.de" , "linux-kernel@vger.kernel.org" , "mark.rutland@arm.com" , "dalias@libc.org" , "linux-ia64@vger.kernel.org" , "linux-sh@vger.kernel.org" , "peterz@infradead.org" , "jcmvbkbc@gmail.com" , "guoren@kernel.org" , "sparclinux@vger.kernel.org" , "linux-hexagon@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "will@kernel.org" , "ardb@kernel.org" , "linux-s390@vger.kernel.org" , "bcain@codeaurora.org" , "deller@gmx.de" , "x86@kernel.org" , "linux@armlinux.org.uk" , "linux-csky@vger.kernel.org" , "mingo@redhat.com" , "geert@linux-m68k.org" , "linux-snps-arc@lists.infradead.org" , "linux-xtensa@linux-xtensa.org" , "hca@linux.ibm.com" , "linux-alpha@vger.kernel.org" , "linux-um@lists.infradead.org" , "linux-m68k@lists.linux-m68k.org" , "openrisc@lists.librecores.org" , "green.hu@gmail.com" , "shorne@gmail.com" , "monstr@monstr.eu" , "tsbogend@alpha.franken.de" , "linux-parisc@vger.kernel.org" , "nickhu@andestech.com" , "linux-mips@vger.kernel.org" , "dinguyen@kernel.org" , "ebiederm@xmission.com" , "richard@nod.at" , "akpm@linux-foundation.org" , "linuxppc-dev@lists.ozlabs.org" , "davem@davemloft.net" Subject: Re: [PATCH v2 00/18] clean up asm/uaccess.h, kill set_fs for good Message-ID: References: <20220216131332.1489939-1-arnd@kernel.org> <00496df2-f9f2-2547-3ca3-7989e4713d6b@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4C54D180002 X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=none; spf=none (imf16.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 142.44.231.140) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=none X-Stat-Signature: y6ek759qjfs5bz56e1riq9xzu33zj5hn X-Rspamd-Server: rspam03 X-HE-Tag: 1645150869-826795 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 17, 2022 at 08:49:59AM +0100, Arnd Bergmann wrote: > Same here: architectures can already provide a __put_user_fn() > and __get_user_fn(), to get the generic versions of the interface, > but few architectures use that. You can actually get all the interfaces > by just providing raw_copy_from_user() and raw_copy_to_user(), > but the get_user/put_user versions you get from that are fairly > inefficient. FWIW, __{get,put}_user_{8,16,32,64} would probably make it easier to unify. That's where the really variable part tends to be, anyway. IMO __get_user_fn() had been a mistake. One thing I somewhat dislike about the series is the boilerplate in asm/uaccess.h instances - #include in a lot of them might make sense as a transitory state, but getting stuck with those indefinitely... BTW, do we need user_addr_max() anymore? The definition in asm-generic/access-ok.h is the only one, so ifndef around it is pointless.