]> git.hungrycats.org Git - linux/commit
[PATCH] Fix copying of unaligned data across user/kernel boundary
authorArun Sharma <arun.sharma@intel.com>
Fri, 27 Aug 2004 03:43:14 +0000 (20:43 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 27 Aug 2004 03:43:14 +0000 (20:43 -0700)
commitce18373907856aedaa6251ff3cdd1340ee4af29a
treef6067623ca7a61bc55b122b90c90d147732e5615
parentfec18575fbb0faf522afbf5b5288962a79ed542f
[PATCH] Fix copying of unaligned data across user/kernel boundary

32 bit compatibility code sometimes needs to copy unaligned data across
kernel/user boundary and currently there is no architecture independent API
to do it.

(1) Introduce new APIs __{get,put}_user_unaligned. These APIs are
    necessary because the optimal way to copy unaligned data across
    kernel/user boundary is different on different architectures.
    Some architectures don't even care about alignment.
    On some __put_user is faster than __copy_to_user for small sizes.
(2) Optimize __{get,put}_user_unaligned for ia64, x86-64, s390, ppc64.
(3) Fix compat_filldir64() which is broken on big-endian machines

Thanks to Arnd Bergmann <arnd@arndb.de> for his help.

Signed-off-by: Gordon Jin <gordon.jin@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/compat.c
include/asm-generic/uaccess.h [new file with mode: 0644]
include/asm-ia64/uaccess.h
include/asm-mips/uaccess.h
include/asm-ppc64/uaccess.h
include/asm-s390/uaccess.h
include/asm-sparc64/uaccess.h
include/asm-x86_64/uaccess.h