Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 235184 - [rhts] ltp test vmsplice fails on ppc64 as a 32-bit app
Summary: [rhts] ltp test vmsplice fails on ppc64 as a 32-bit app
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.0
Hardware: powerpc
OS: Linux
Target Milestone: ---
: ---
Assignee: Don Zickus
QA Contact: Martin Jenner
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-04 11:56 UTC by Don Zickus
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2007-0959
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-07 19:45:58 UTC
Target Upstream Version:

Attachments (Terms of Use)
test program (deleted)
2007-04-04 11:56 UTC, Don Zickus
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0959 normal SHIPPED_LIVE Updated kernel packages for Red Hat Enterprise Linux 5 Update 1 2007-11-08 00:47:37 UTC

Description Don Zickus 2007-04-04 11:56:08 UTC
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 11:56:08 UTC
Created attachment 151650 [details]
test program

Comment 2 Jeff Burke 2007-04-04 20:22:00 UTC
 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 18:22:20 UTC
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 21:55:29 UTC
in 2.6.18-16.el5

Comment 7 Don Zickus 2007-07-17 18:50:22 UTC
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 15:05:23 UTC
*** Bug 237155 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2007-11-07 19:45:58 UTC
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.