lkml.org 
[lkml]   [2021]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 7/9] asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user
On Thu, Jul 22, 2021 at 02:48:12PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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 <geert@linux-m68k.org>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2021-07-22 19:36    [W:0.067 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site