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):
Steps to Reproduce:
Created attachment 151650 [details]
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
@@ -288,7 +288,7 @@ COMPAT_SYS(ppoll)
This request was evaluated by Red Hat Kernel Team for inclusion in a Red
Hat Enterprise Linux maintenance release, and has moved to bugzilla
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.