Bug 235184 - [rhts] ltp test vmsplice fails on ppc64 as a 32-bit app
[rhts] ltp test vmsplice fails on ppc64 as a 32-bit app
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: Don Zickus
Martin Jenner
: 237155 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-04-04 07:56 EDT by Don Zickus
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0959
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 14:45:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test program (4.38 KB, text/x-csrc)
2007-04-04 07:56 EDT, Don Zickus
no flags Details

  None (edit)
Description Don Zickus 2007-04-04 07:56:08 EDT
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:
Actual results:

Expected results:

Additional info:
Comment 1 Don Zickus 2007-04-04 07:56:08 EDT
Created attachment 151650 [details]
test program
Comment 2 Jeff Burke 2007-04-04 16:22:00 EDT
 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)
Comment 3 RHEL Product and Program Management 2007-04-18 14:22:20 EDT
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.
Comment 4 Don Zickus 2007-04-23 17:55:29 EDT
in 2.6.18-16.el5
Comment 7 Don Zickus 2007-07-17 14:50:22 EDT
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.
Comment 10 Linda Wang 2007-08-14 11:05:23 EDT
*** Bug 237155 has been marked as a duplicate of this bug. ***
Comment 12 errata-xmlrpc 2007-11-07 14:45:58 EST
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.


Note You need to log in before you can comment on or make changes to this bug.