diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-13 16:17:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-13 16:17:12 -0400 |
commit | 6ddb99043cac53e30a38d68fe0835c901fbbbeb5 (patch) | |
tree | 6c049914a2a08fde3b367d66347b16a55496b824 /arch/m68k/include/asm | |
parent | 7794f709c5897e8876801ff205cc758c0e7bc901 (diff) | |
parent | d8ce7263e1bc3b6b2b906fec0c5037bc27d21d6a (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k update from Geert Uytterhoeven.
This makes m68k use the generic library functions for the user-space
strn[cpy|len] functions.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user()
Diffstat (limited to 'arch/m68k/include/asm')
-rw-r--r-- | arch/m68k/include/asm/Kbuild | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/uaccess_mm.h | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 1a922fad76f7..eafa2539a8ee 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -1,2 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | header-y += cachectl.h | 2 | header-y += cachectl.h |
3 | |||
4 | generic-y += word-at-a-time.h | ||
diff --git a/arch/m68k/include/asm/uaccess_mm.h b/arch/m68k/include/asm/uaccess_mm.h index 9c80cd515b20..472c891a4aee 100644 --- a/arch/m68k/include/asm/uaccess_mm.h +++ b/arch/m68k/include/asm/uaccess_mm.h | |||
@@ -379,12 +379,15 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n) | |||
379 | #define copy_from_user(to, from, n) __copy_from_user(to, from, n) | 379 | #define copy_from_user(to, from, n) __copy_from_user(to, from, n) |
380 | #define copy_to_user(to, from, n) __copy_to_user(to, from, n) | 380 | #define copy_to_user(to, from, n) __copy_to_user(to, from, n) |
381 | 381 | ||
382 | long strncpy_from_user(char *dst, const char __user *src, long count); | 382 | #define user_addr_max() \ |
383 | long strnlen_user(const char __user *src, long n); | 383 | (segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL) |
384 | |||
385 | extern long strncpy_from_user(char *dst, const char __user *src, long count); | ||
386 | extern __must_check long strlen_user(const char __user *str); | ||
387 | extern __must_check long strnlen_user(const char __user *str, long n); | ||
388 | |||
384 | unsigned long __clear_user(void __user *to, unsigned long n); | 389 | unsigned long __clear_user(void __user *to, unsigned long n); |
385 | 390 | ||
386 | #define clear_user __clear_user | 391 | #define clear_user __clear_user |
387 | 392 | ||
388 | #define strlen_user(str) strnlen_user(str, 32767) | ||
389 | |||
390 | #endif /* _M68K_UACCESS_H */ | 393 | #endif /* _M68K_UACCESS_H */ |