Title: [6584] trunk/arch/blackfin/include/asm/uaccess.h: dont check the length given to strnlen_user() since some parts of the kernel give unrealistically large sizes which never validate on no-mmu (like fs/exec.c:copy_strings())
Revision
6584
Author
vapier
Date
2009-06-04 14:13:52 -0500 (Thu, 04 Jun 2009)

Log Message

dont check the length given to strnlen_user() since some parts of the kernel give unrealistically large sizes which never validate on no-mmu (like fs/exec.c:copy_strings())

Modified Paths

Diff

Modified: trunk/arch/blackfin/include/asm/uaccess.h (6583 => 6584)


--- trunk/arch/blackfin/include/asm/uaccess.h	2009-06-04 19:11:31 UTC (rev 6583)
+++ trunk/arch/blackfin/include/asm/uaccess.h	2009-06-04 19:13:52 UTC (rev 6584)
@@ -225,13 +225,11 @@
  */
 static inline long __must_check strnlen_user(const char *src, long n)
 {
-	if (!access_ok(VERIFY_READ, src, n))
+	if (!access_ok(VERIFY_READ, src, 1))
 		return 0;
 	return strnlen(src, n) + 1;
 }
 
-/* We don't know the length, so only check the start of the string */
-
 static inline long __must_check strlen_user(const char *src)
 {
 	if (!access_ok(VERIFY_READ, src, 1))
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to