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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FC21C433B4 for ; Mon, 17 May 2021 06:20:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F8586121F for ; Mon, 17 May 2021 06:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbhEQGVi (ORCPT ); Mon, 17 May 2021 02:21:38 -0400 Received: from verein.lst.de ([213.95.11.211]:56077 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhEQGVi (ORCPT ); Mon, 17 May 2021 02:21:38 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 465B36736F; Mon, 17 May 2021 08:20:18 +0200 (CEST) Date: Mon, 17 May 2021 08:20:18 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, Arnd Bergmann , Christoph Hellwig , Al Viro , Vineet Gupta , Yoshinori Sato , Brian Cain , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jeff Dike , Richard Weinberger , Anton Ivanov , Sid Manning , Andrew Morton , Mike Rapoport , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-um@lists.infradead.org Subject: Re: [PATCH 5/6] [v2] asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user Message-ID: <20210517062018.GC23581@lst.de> References: <20210515101803.924427-1-arnd@kernel.org> <20210515101803.924427-6-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210515101803.924427-6-arnd@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Sat, May 15, 2021 at 12:18:02PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Consolidate the asm-generic implementation with the library version > that is used everywhere else. > > These are the three versions for NOMMU kernels, I don't get the three versions part? > + select GENERIC_STRNCPY_FROM_USER > + select GENERIC_STRNLEN_USER Given that most architetures select the generic version I wonder if it might be worth to add another patch to invert the logic so that architectures with their own implementation need to sekect a symbol. > +extern long strncpy_from_user(char *dst, const char __user *src, long count); > +extern long strnlen_user(const char __user *src, long n); No need for the extern here.