WSL2-Linux-Kernel/arch
Arnd Bergmann 98b861a304 asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user
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.

Mark the prototypes as __must_check in the process.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-07-27 23:01:13 +02:00
..
alpha Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
arc arc: use generic strncpy/strnlen from_user 2021-07-23 14:40:01 +02:00
arm ARM: SoC fixes for v5.14 2021-07-17 15:58:24 -07:00
arm64 ARM: SoC fixes for v5.14 2021-07-17 15:58:24 -07:00
csky csky: use generic strncpy/strnlen from_user 2021-07-23 14:40:01 +02:00
h8300 asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user 2021-07-27 23:01:13 +02:00
hexagon hexagon: use generic strncpy/strnlen from_user 2021-07-23 14:40:00 +02:00
ia64 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
m68k asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user 2021-07-27 23:01:13 +02:00
microblaze microblaze: use generic strncpy/strnlen from_user 2021-07-27 23:01:13 +02:00
mips Merge tag 'kvm-s390-master-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD 2021-07-14 12:14:27 -04:00
nds32 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
nios2 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
openrisc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
parisc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
powerpc Merge tag 'kvm-s390-master-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD 2021-07-14 12:14:27 -04:00
riscv asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user 2021-07-27 23:01:13 +02:00
s390 s390: use generic strncpy/strnlen from_user 2021-07-27 23:01:13 +02:00
sh Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
sparc Locking fixes: 2021-07-11 11:06:09 -07:00
um asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user 2021-07-23 14:39:56 +02:00
x86 * Allow again loading KVM on 32-bit non-PAE builds 2021-07-15 11:56:07 -07:00
xtensa Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR 2021-06-22 11:07:18 -07:00