Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82985258 authored by Al Viro's avatar Al Viro
Browse files

kill strlen_user()



no callers, no consistent semantics, no sane way to use it...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2ea659a9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -326,7 +326,6 @@ clear_user(void __user *to, long len)
        (uaccess_kernel() ? ~0UL : TASK_SIZE)

extern long strncpy_from_user(char *dest, const char __user *src, long count);
extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *str, long n);

#include <asm/extable.h>
+0 −1
Original line number Diff line number Diff line
@@ -526,7 +526,6 @@ static inline unsigned long __must_check clear_user(void __user *to, unsigned lo
/* These are from lib/ code, and use __get_user() and friends */
extern long strncpy_from_user(char *dest, const char __user *src, long count);

extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *str, long n);

#endif /* _ASMARM_UACCESS_H */
+0 −1
Original line number Diff line number Diff line
@@ -349,7 +349,6 @@ static inline unsigned long __must_check clear_user(void __user *to, unsigned lo

extern long strncpy_from_user(char *dest, const char __user *src, long count);

extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *str, long n);

#endif /* __ASM_UACCESS_H */
+0 −7
Original line number Diff line number Diff line
@@ -194,13 +194,6 @@ static inline long __must_check strnlen_user(const char __user *src, long n)
	return strnlen((const char __force *)src, n) + 1;
}

static inline long __must_check strlen_user(const char __user *src)
{
	if (!access_ok(VERIFY_READ, src, 1))
		return 0;
	return strlen((const char __force *)src) + 1;
}

/*
 * Zero Userspace
 */
+0 −2
Original line number Diff line number Diff line
@@ -363,6 +363,4 @@ __clear_user(void __user *to, unsigned long n)
	return __do_clear_user(to, n);
}

#define strlen_user(str)	strnlen_user((str), 0x7ffffffe)

#endif	/* _CRIS_UACCESS_H */
Loading