summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/uaccess.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-04-07 17:20:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-05-15 23:40:22 -0400
commit82985258390e85289940d3663344197344e071f2 (patch)
tree9209037b20e4c5117b87a03e0add1c305c4eb25f /arch/mips/include/asm/uaccess.h
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
kill strlen_user()
no callers, no consistent semantics, no sane way to use it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/include/asm/uaccess.h')
-rw-r--r--arch/mips/include/asm/uaccess.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h
index 99e629a590a5..846628eee108 100644
--- a/arch/mips/include/asm/uaccess.h
+++ b/arch/mips/include/asm/uaccess.h
@@ -1073,50 +1073,6 @@ strncpy_from_user(char *__to, const char __user *__from, long __len)
return res;
}
-extern long __strlen_kernel_asm(const char __user *s);
-extern long __strlen_user_asm(const char __user *s);
-
-/*
- * strlen_user: - Get the size of a string in user space.
- * @str: The string to measure.
- *
- * Context: User context only. This function may sleep if pagefaults are
- * enabled.
- *
- * Get the size of a NUL-terminated string in user space.
- *
- * Returns the size of the string INCLUDING the terminating NUL.
- * On exception, returns 0.
- *
- * If there is a limit on the length of a valid string, you may wish to
- * consider using strnlen_user() instead.
- */
-static inline long strlen_user(const char __user *s)
-{
- long res;
-
- if (eva_kernel_access()) {
- __asm__ __volatile__(
- "move\t$4, %1\n\t"
- __MODULE_JAL(__strlen_kernel_asm)
- "move\t%0, $2"
- : "=r" (res)
- : "r" (s)
- : "$2", "$4", __UA_t0, "$31");
- } else {
- might_fault();
- __asm__ __volatile__(
- "move\t$4, %1\n\t"
- __MODULE_JAL(__strlen_user_asm)
- "move\t%0, $2"
- : "=r" (res)
- : "r" (s)
- : "$2", "$4", __UA_t0, "$31");
- }
-
- return res;
-}
-
extern long __strnlen_kernel_nocheck_asm(const char __user *s, long n);
extern long __strnlen_user_nocheck_asm(const char __user *s, long n);