Bug 571432

Summary: strace incorrectly shows the arguments of fadvise() in 32 bit compat programs
Product: [Fedora] Fedora Reporter: john.haxby <john.haxby>
Component: straceAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dvlasenk, roland, schwab
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: strace-4.5.20-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-27 18:31:37 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
Proposed patch none

Description john.haxby@oracle.com 2010-03-08 14:33:31 UTC
Created attachment 398534 [details]
Proposed patch

Description of problem:
  strace incorrectly shows the arguments of fadvise() in
  32 bit compat programs

Version-Release number of selected component (if applicable):
  strace-4.5.19-1.fc12.x86_64

How reproducible: Always


Steps to Reproduce:
1. Find a program that calls posix_fadvise(2).  My sample program calls
   posix_fadvise(2) like this:

        posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM);
        posix_fadvise(fd, 5, 7, POSIX_FADV_SEQUENTIAL);
        posix_fadvise64(fd, 0, 0, POSIX_FADV_RANDOM);
        posix_fadvise64(fd, 5, 7, POSIX_FADV_SEQUENTIAL);

   (The second and third arguments are only to illustrate the problem, they
    don't actually have any useful meaning.)

2. Compile it as a 32 bit application
3. Run under strace.
  
Actual results:
  fadvise64(3, 0, 0, POSIX_FADV_NORMAL)   = 0
  fadvise64(3, 5, 0, 0x7 /* POSIX_FADV_??? */) = 0
  fadvise64_64(3, 0, 0, POSIX_FADV_NORMAL) = 0
  fadvise64_64(3, 5, 0, 0x7 /* POSIX_FADV_??? */) = 0

Expected results:
  fadvise64(3, 0, 0, POSIX_FADV_RANDOM)   = 0
  fadvise64(3, 5, 7, POSIX_FADV_SEQUENTIAL) = 0
  fadvise64_64(3, 0, 0, POSIX_FADV_RANDOM) = 0
  fadvise64_64(3, 5, 7, POSIX_FADV_SEQUENTIAL) = 0


Additional info:
  The attached patch fixes this problem, it is based on:

    commit b5600fc3df0453ba11f254a9b49add3ffbec9733
    Author: Andreas Schwab <schwab>
    Date:   Wed Nov 4 17:08:34 2009 +0100

  (The changes are merely needed to make it apply cleanly.)

Comment 1 john.haxby@oracle.com 2010-03-08 14:44:15 UTC
See also bug 571437 (RHEL5)

Comment 2 Fedora Update System 2010-05-10 16:14:37 UTC
strace-4.5.20-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/strace-4.5.20-1.fc12

Comment 3 john.haxby@oracle.com 2010-05-10 16:35:25 UTC
That version works for me.

Comment 4 Fedora Update System 2010-05-11 19:36:45 UTC
strace-4.5.20-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update strace'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/strace-4.5.20-1.fc12

Comment 5 Fedora Update System 2010-05-27 18:31:32 UTC
strace-4.5.20-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.