Bug 235184

Summary: [rhts] ltp test vmsplice fails on ppc64 as a 32-bit app
Product: Red Hat Enterprise Linux 5 Reporter: Don Zickus <dzickus>
Component: kernelAssignee: Don Zickus <dzickus>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: jburke, tao
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0959 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 19:45:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test program none

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:
1.
2.
3.
  
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
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)


Comment 3 RHEL 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.

http://rhn.redhat.com/errata/RHBA-2007-0959.html