Re: [PATCH 0/5] asm-generic: strncpy_from_user/strnlen_user cleanup

2021-05-15 Thread Christoph Hellwig
I generall like this consolidation, but for the patches that remote the arch / asm-generic versions, can you please elaborate a little more why the lib version is preferable? The current commit logs are not very informative. ___ linux-snps-arc mailing

ARC updates for 5.13-rc2

2021-05-15 Thread Vineet Gupta
Hi Linus, A bunch of fixes for ARC for 5.13 cycle. Please pull ! Thx, -Vineet ---> The following changes since commit 6efb943b8616ec53a5e444193dccf1af9ad627b5: Linux 5.13-rc1 (2021-05-09 14:17:44 -0700) are available in the Git repository at:

Re: [PATCH 0/5] asm-generic: strncpy_from_user/strnlen_user cleanup

2021-05-15 Thread Arnd Bergmann
On Sat, May 15, 2021 at 8:40 AM Christoph Hellwig wrote: > > I generall like this consolidation, but for the patches that remote > the arch / asm-generic versions, can you please elaborate a little > more why the lib version is preferable? The current commit logs are > not very informative.

[PATCH 3/6] [v2] hexagon: use generic strncpy/strnlen from_user

2021-05-15 Thread Arnd Bergmann
From: Arnd Bergmann Most per-architecture versions of these functions are broken in some form, and they are almost certainly slower than the generic code as well. Remove the ones for hexagon and instead use the generic version. This custom version reads the data twice for strncpy() by doing an

[PATCH 4/6] [v2] arc: use generic strncpy/strnlen from_user

2021-05-15 Thread Arnd Bergmann
From: Arnd Bergmann Most per-architecture versions of these functions are broken in some form, and they are almost certainly slower than the generic code as well. This version is fairly slow because it always does byte accesses even for aligned data, and its checks for user_addr_max() differ

[PATCH 5/6] [v2] asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user

2021-05-15 Thread Arnd Bergmann
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, which can in principle fall back to strncpy()/strnlen() as the version in asm-generic does, but this version is particularly

[PATCH 6/6] [v2] asm-generic: remove extra strn{cpy_from, len}_user declarations

2021-05-15 Thread Arnd Bergmann
From: Arnd Bergmann As these are now in asm-generic, it's no longer necessary to declare them in the architecture. Signed-off-by: Arnd Bergmann --- arch/arc/include/asm/uaccess.h | 5 - arch/hexagon/include/asm/uaccess.h | 6 -- arch/um/include/asm/uaccess.h | 5 + 3

[PATCH 1/6] [v2] asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user

2021-05-15 Thread Arnd Bergmann
From: Arnd Bergmann This is a preparation for changing over architectures to the generic implementation one at a time. As there are no callers of either __strncpy_from_user() or __strnlen_user(), fold these into the strncpy_from_user() strnlen_user() functions to make each implementation

[PATCH 2/6] [v2] h8300: remove stale strncpy_from_user

2021-05-15 Thread Arnd Bergmann
From: Arnd Bergmann This function is never called because h8300 uses the asm-generic inline function version. Signed-off-by: Arnd Bergmann --- arch/h8300/kernel/h8300_ksyms.c | 2 -- arch/h8300/lib/Makefile | 2 +- arch/h8300/lib/strncpy.S| 35

[PATCH 0/6] [v2] asm-generic: strncpy_from_user/strnlen_user cleanup

2021-05-15 Thread Arnd Bergmann
From: Arnd Bergmann As I've queued up some patches for asm-generic, I remembered an older series that I created but never submitted. These two functions appear to be unnecessarily different between architectures, and the asm-generic version is a bit questionable, even for NOMMU architectures.