Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp914015pxb; Thu, 17 Feb 2022 18:21:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxx+BxJHtpgWpPSOPsGCvjsFsQ4+LYclHsp+TFWzAA21quFgxLjPwc7tHbmx0YDmPdkt5ds X-Received: by 2002:a63:6906:0:b0:36c:8493:dadf with SMTP id e6-20020a636906000000b0036c8493dadfmr4647975pgc.80.1645150875733; Thu, 17 Feb 2022 18:21:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645150875; cv=none; d=google.com; s=arc-20160816; b=iMls+D/QjRcrodf/38VI/fF+KaRhcSG2Slyi5K3wT5LHq2Qu71vyMsg1nXECY3oK8i Kx/D/LRHAzhY5T2mC6O46TMFE49lSa7WBngjjdZm0ZmDsKNNxNTSHms5lQZQJtT1JhhG QIIkkZPZpce8fCfyCAZdMYVjdrkI+J/r5J7QJ59v5+MicvZHCq6Rgffr8b7c+0tajJCr Kwrb0kddEl6/35fp245zu0LpFs1bO0mcsRo3Aqrj9C9NiE51EUtnngcAQL+sYd5jT0uO NBpbWFtr0RVRp5iIu6LcWIjWZEOZleny6b2ypHj4OAOVDrgiJox0QFeIuuElwvwis3qh dYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=e/7L7U7EKDTZKZz6oWwrn6BcpEMW5cXZLeWihjfA/bY=; b=dwWjFe5EDW0ksXhOIHegnEf2qTyrIcOhEQWbJx+KD3yMxTJcp21z2gQ1fW6JRuN7fg ulb/HfoljgWqWh3ukZ50Fj72GGyL27kGRh9itWpmblXIK8pSGfqDUqh3jbS+IRILxp/7 btgZA1tPvCasIyjCKoBam/FtYceELvZdRBUJrB2EvpRc5MxZMM++hNZQdS0cffEa6frC nl4iiQ9YZRa0tCUyGmjZy6k5CBLUwLZEfN1jn1bxybzjUfW5Jpg59TqcgS2AE8X7z2wS a9C92QyJWTEjlqbyz2v/pMasxUVk/WROZzmL8ULvy04LDZv7/CblG03TqopTt31as37r Rk/g== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e3si12481790plt.451.2022.02.17.18.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 18:21:15 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E483910EC43; Thu, 17 Feb 2022 18:21:12 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbiBRCVZ (ORCPT + 99 others); Thu, 17 Feb 2022 21:21:25 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:53010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231465AbiBRCVX (ORCPT ); Thu, 17 Feb 2022 21:21:23 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AE5985674; Thu, 17 Feb 2022 18:21:08 -0800 (PST) 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: Sender: Al Viro X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.