• Arun Sharma's avatar
    [PATCH] Fix copying of unaligned data across user/kernel boundary · ce183739
    Arun Sharma authored
    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: default avatarGordon Jin <gordon.jin@intel.com>
    Signed-off-by: default avatarArun Sharma <arun.sharma@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ce183739
uaccess.h 701 Bytes