Bug#841240: linux: x32 preadv/pwritev syscalls broken in kernel 4.7
Source: linux
Version: 4.7.6-1
Severity: normal
The x32 preadv/pwritev syscalls have been broken in kernel 4.7-rc1 by
this commit:
| commit 482dd2ef124484601adea82e5e806e81e2bc5521
| Author: Christoph Hellwig <hch@lst.de>
| Date: Thu Apr 7 22:43:59 2016 +0200
|
| x86/syscalls: Wire up compat readv2/writev2 syscalls
|
| Reported-by: David Smith <dsmith@redhat.com>
| Tested-by: David Smith <dsmith@redhat.com>
| Signed-off-by: Christoph Hellwig <hch@lst.de>
| Cc: Andy Lutomirski <luto@amacapital.net>
| Cc: Borislav Petkov <bp@alien8.de>
| Cc: Brian Gerst <brgerst@gmail.com>
| Cc: Denys Vlasenko <dvlasenk@redhat.com>
| Cc: H. Peter Anvin <hpa@zytor.com>
| Cc: Linus Torvalds <torvalds@linux-foundation.org>
| Cc: Peter Zijlstra <peterz@infradead.org>
| Cc: Thomas Gleixner <tglx@linutronix.de>
| Link: http://lkml.kernel.org/r/20160407204359.GA3720@lst.de
| Signed-off-by: Ingo Molnar <mingo@kernel.org>
It causes the glibc testsuite to fail on x32 when running a 4.7 kernel,
and more precisely the misc/tst-preadvwritev and misc/tst-preadvwritev64
tests.
The syscalls have been fixed in kernel 4.8-rc1 by this commit, even if
neither the commit nor the mail it refers too talk about a breakage:
| commit 3ebfd81f7fb3e81a754e37283b7f38c62244641a
| Author: H.J. Lu <hjl.tools@gmail.com>
| Date: Thu Jul 14 12:31:53 2016 -0700
|
| x86/syscalls: Add compat_sys_preadv64v2/compat_sys_pwritev64v2
|
| Don't use the same syscall numbers for 2 different syscalls:
|
| 534 x32 preadv compat_sys_preadv64
| 535 x32 pwritev compat_sys_pwritev64
| 534 x32 preadv2 compat_sys_preadv2
| 535 x32 pwritev2 compat_sys_pwritev2
|
| Add compat_sys_preadv64v2() and compat_sys_pwritev64v2() so that 64-bit offset
| is passed in one 64-bit register on x32, similar to compat_sys_preadv64()
| and compat_sys_pwritev64().
|
| Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
| x86/syscalls: Add compat_sys_preadv64v2/compat_sys_pwritev64v2
|
| Don't use the same syscall numbers for 2 different syscalls:
|
| 534 x32 preadv compat_sys_preadv64
| 535 x32 pwritev compat_sys_pwritev64
| 534 x32 preadv2 compat_sys_preadv2
| 535 x32 pwritev2 compat_sys_pwritev2
|
| Add compat_sys_preadv64v2() and compat_sys_pwritev64v2() so that 64-bit offset
| is passed in one 64-bit register on x32, similar to compat_sys_preadv64()
| and compat_sys_pwritev64().
|
| Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
| Cc: Andy Lutomirski <luto@kernel.org>
| Cc: Borislav Petkov <bp@alien8.de>
| Cc: Brian Gerst <brgerst@gmail.com>
| Cc: Christoph Hellwig <hch@lst.de>
| Cc: Denys Vlasenko <dvlasenk@redhat.com>
| Cc: H. Peter Anvin <hpa@zytor.com>
| Cc: Josh Poimboeuf <jpoimboe@redhat.com>
| Cc: Linus Torvalds <torvalds@linux-foundation.org>
| Cc: Peter Zijlstra <peterz@infradead.org>
| Cc: Thomas Gleixner <tglx@linutronix.de>
| Link: http://lkml.kernel.org/r/CAMe9rOovCMf-RQfx_n1U_Tu_DX1BYkjtFr%3DQ4-_PFVSj9BCzUA@mail.gmail.com
| Signed-off-by: Ingo Molnar <mingo@kernel.org>
Unfortunately this commit is not easily backportable as it completely
breaks the ABI. Nevertheless it should not be a big deal as we'll go to
kernel 4.8 soon. Given it is already available in experimental, I am
just going to close this bug in a few minutes. I just wanted to make
sure the issue is documented somewhere so that someone else do not spend
hours before finding the issue.
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Reply to: