Description of problem: ltp tests the syscalls of the kernel. One of those tests, vmsplice, tests the new splice and vmsplice interface. As a 64-bit app on powerpc the test is successful. As a 32-bit app it fails. Looking into the problem, vmsplice requires an struct iovec to passed in. This struct iovec contains and address to a buffer and its length. Somehow the buffer address is not padded with zeroes and is placed in the upper 32-bits when read by the kernel. This causes an EFAULT and vmsplice fails. When I force the padding in userspace, the test succeeds as expected. I am not sure where the problem lies (kernel or gcc or glibc). The test does work in both 32-bit and 64-bit for the x86_64 kernel. Attached is the modified ltp test (allows one to compile and run w/o the ltp baggage). Compile with 'gcc -o vmsplice vmsplice.c'. Run with ./vmsplice Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Created attachment 151650 [details] test program
Don, Had come up with a kernel patch to fix this issue. He wil lpost it upstream and into the internal mailling list for review. diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 8d853c5..0b00068 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h @@ -288,7 +288,7 @@ COMPAT_SYS(ppoll) SYSCALL_SPU(unshare) SYSCALL_SPU(splice) SYSCALL_SPU(tee) -SYSCALL_SPU(vmsplice) +COMPAT_SYS_SPU(vmsplice) COMPAT_SYS_SPU(openat) SYSCALL_SPU(mkdirat) SYSCALL_SPU(mknodat)
This request was evaluated by Red Hat Kernel Team for inclusion in a Red Hat Enterprise Linux maintenance release, and has moved to bugzilla status POST.
in 2.6.18-16.el5
I'm not sure if this really needs a release note. It was caught by one of our internal tests and an oversight from upstream. vmsplice is still relatively new that no one is probably using it which is why we haven't had customer complain about it yet.
*** Bug 237155 has been marked as a duplicate of this bug. ***
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0959.html