Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp523288pxv; Thu, 22 Jul 2021 06:08:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEQjT29UOrzPYrQcX1Ax8IXnS6IsslHu571kbX4Yydxrx9NSkDM6E2i+d+v2XJsGzuzcZW X-Received: by 2002:a17:906:2bd4:: with SMTP id n20mr44170083ejg.390.1626959307459; Thu, 22 Jul 2021 06:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626959307; cv=none; d=google.com; s=arc-20160816; b=BgDzwiDMyLmYD916kpuB04Jn4J4MlRgkQRcIPatpXs3QmE4smYFx3rT/v+quMOHVq3 t9SrxPgpCWi6f2IkPCGyM+L9wyiEWH7XAIurL91YOuZU1HAqwR5vaXFAFXpYYWx9GMvb u5f15MIpMq4pmrMGGENLjsaXsJUIVwMQI1iwy7iucVXzbQU4gwgkv8oyy62X8/FwDoG2 l8eaMA0lE5Lp4WX2xd2EV7QEhkW4thGGC107gjpv/jfXPcG5UUW8dozPi7Wu+XGahhzF tXIAuzSa1POwKVfgRd9mwMgfuXxPitodJVkTmGABP7rKduRpdpLJnFtB9OfuBp/BBhAI g36g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CXbn5OSBTFQgLXJyQuH9yfSio/S9iy9w5e+HObtdWS0=; b=lb83w5n5i0M/f9DIYGtwoK7wGR/hyuBqdXabwMPaNc6VEhx3ZQ2NCzq37FShOHCW+z QGLBEnlaron/TPOQyh9qocyZ4MCdhKpCZ/ctDvYteUv1P9XUXLJfwftM6vRt+t5OlDL8 RegWPBxmiJxzp5p7LZQIpnFrykv+VKNnwZDhd1LoSL/Q64iClnqMxwErziP+M/vkGl2G 0IkZx5OXC78106Bl+Rr787edNqEfjJVqyAI2GiHTpf3UONs8XJDJlln5SRlWmIzdrqpH nC8QIfN3RBp4vAnk8aVF/O+tKx8gAZJBWYVF40EgSpzqZ2J7ejT9w53GBYjEGJnbtT8i R+Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si31335200edw.9.2021.07.22.06.08.03; Thu, 22 Jul 2021 06:08:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbhGVMXg (ORCPT + 99 others); Thu, 22 Jul 2021 08:23:36 -0400 Received: from verein.lst.de ([213.95.11.211]:34134 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232042AbhGVMVg (ORCPT ); Thu, 22 Jul 2021 08:21:36 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 2F23368C7B; Thu, 22 Jul 2021 15:02:09 +0200 (CEST) Date: Thu, 22 Jul 2021 15:02:09 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, Arnd Bergmann , "James E.J. Bottomley" , Al Viro , Anton Ivanov , Brian Cain , Chris Zankel , Christian Borntraeger , Christoph Hellwig , Guo Ren , Heiko Carstens , Helge Deller , Jeff Dike , Linus Walleij , Max Filippov , Michal Simek , Richard Weinberger , Thomas Bogendoerfer , Vasily Gorbik , Vineet Gupta , Yoshinori Sato , linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, uclinux-h8-devel@lists.sourceforge.jp, Geert Uytterhoeven Subject: Re: [PATCH v3 7/9] asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user Message-ID: <20210722130209.GG26225@lst.de> References: <20210722124814.778059-1-arnd@kernel.org> <20210722124814.778059-8-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722124814.778059-8-arnd@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 02:48:12PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The inline version is used on three NOMMU architectures and is > particularly inefficient when it scans the string one byte at a time > twice. It also lacks a check for user_addr_max(), but this is > probably ok on NOMMU targets. > > Consolidate the asm-generic implementation with the library version > that is used everywhere else. This version is generalized enough to > work efficiently on both MMU and NOMMU targets, and using the > same code everywhere reduces the potential for subtle bugs. > > Reviewed-by: Geert Uytterhoeven > Acked-by: Geert Uytterhoeven > Signed-off-by: Arnd Bergmann Looks good, Reviewed-by: Christoph Hellwig