• Heiko Carstens's avatar
    fs/compat: fix parameter handling for compat readv/writev syscalls · dfd948e3
    Heiko Carstens authored
    We got a report that the pwritev syscall does not work correctly in
    compat mode on s390.
    
    It turned out that with commit 72ec3516 ("switch compat readv/writev
    variants to COMPAT_SYSCALL_DEFINE") we lost the zero extension of a
    couple of syscall parameters because the some parameter types haven't
    been converted from unsigned long to compat_ulong_t.
    
    This is needed for architectures where the ABI requires that the caller
    of a function performed zero and/or sign extension to 64 bit of all
    parameters.
    Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: <stable@vger.kernel.org>	[v3.10+]
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    dfd948e3
read_write.c 27.3 KB