Re: [PATCH v3 7/9] asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 22, 2021 at 02:48:12PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
> 
> 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@xxxxxxxxxxxxxx>
> Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux