summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-08-13 12:00:12 +0200
committerArnd Bergmann <arnd@arndb.de>2021-08-13 12:02:04 +0200
commita71bfc0079762b4d3cb36dcc5fe6c23c806cfc8c (patch)
tree40fdb4ebf75bda1099ee1cef769427028ddc2db1 /lib
parentfc062ad8e406a08b624b3ab3427434800ff886f8 (diff)
parente6226997ec5ac272fa76274c3675bd5b7b437c53 (diff)
Merge branch 'asm-generic-uaccess-7' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic into asm-generic
These two functions appear to be unnecessarily different between architectures, and the asm-generic version is a bit questionable, even for NOMMU architectures. Clean this up to just use the generic library version for anything that uses the generic version today. I've expanded on the patch descriptions a little, as suggested by Christoph Hellwig, but I suspect a more detailed review would uncover additional problems with the custom versions that are getting removed. I ended up adding patches for csky and microblaze as they had the same implementation that I removed elsewhere, these are now gone as well. * 'asm-generic-uaccess-7' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols asm-generic: remove extra strn{cpy_from,len}_user declarations asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user s390: use generic strncpy/strnlen from_user microblaze: use generic strncpy/strnlen from_user csky: use generic strncpy/strnlen from_user arc: use generic strncpy/strnlen from_user hexagon: use generic strncpy/strnlen from_user h8300: remove stale strncpy_from_user asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index d241fe476fda..0e66c9fa636b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -50,12 +50,18 @@ config HAVE_ARCH_BITREVERSE
This option enables the use of hardware bit-reversal instructions on
architectures which support such operations.
-config GENERIC_STRNCPY_FROM_USER
+config ARCH_HAS_STRNCPY_FROM_USER
bool
-config GENERIC_STRNLEN_USER
+config ARCH_HAS_STRNLEN_USER
bool
+config GENERIC_STRNCPY_FROM_USER
+ def_bool !ARCH_HAS_STRNCPY_FROM_USER
+
+config GENERIC_STRNLEN_USER
+ def_bool !ARCH_HAS_STRNLEN_USER
+
config GENERIC_NET_UTILS
bool