Bug 559410 - posix_fadvise() handles its arguments incorrectly in 32-bit compat mode.
Summary: posix_fadvise() handles its arguments incorrectly in 32-bit compat mode.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.6
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Wade Mealing
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
: 554735 (view as bug list)
Depends On: 554735
Blocks: 569595 569596 569597
TreeView+ depends on / blocked
 
Reported: 2010-01-28 02:22 UTC by Wade Mealing
Modified: 2018-10-27 15:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:28:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Implement the 32 bit syscalls in 64 bit systems. (2.02 KB, patch)
2010-01-28 04:39 UTC, Wade Mealing
no flags Details | Diff
reproducer from Issue Tracker (979 bytes, text/html)
2010-03-04 07:13 UTC, yanfu,wang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Wade Mealing 2010-01-28 02:22:36 UTC
Description of problem:

A program doesn't run correctly on x86_64 if it calls posix_fadvise() and was compiled on x86.  This problem can be solved by calling sys32_fadvise64() instead of sys_fadvise64() in the kernel
when posix_fadvise() is called in the 32-bit compat mode.


Version-Release number of selected component (if applicable):

2.6.18-164.el5

How reproducible:

Every time


Steps to Reproduce:
1. Compile fadvise_test.c (gcc -m32 fadvise_test.c -o fadvise_test32)
2. Run strace against the fadvise_test32.
3. Note that the posix_fadvise() fails with EINVAL , even when args are valid.


Actual results:

System calls fail, apps dont work as they should if they use posix_fadvise.

Expected results:

These 32 bit syscalls on a 64 bit system should work as they would on a 32 bit system.

Additional info:

This is a backport of this patch from upstream:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e412ac4971d27ea84f3d63ce425c6ab2d6a67f23

The customer has tested a kernel with the patch attached and verifies it works.

Patch to be attached, will mail to kernel-list when I have some time without a S1.

Comment 2 Wade Mealing 2010-01-28 04:39:30 UTC
Created attachment 387235 [details]
Implement the 32 bit syscalls in 64 bit systems.

Comment 12 Jarod Wilson 2010-03-03 15:44:31 UTC
in kernel-2.6.18-191.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Please update the appropriate value in the Verified field
(cf_verified) to indicate this fix has been successfully
verified. Include a comment with verification details.

Comment 15 yanfu,wang 2010-03-04 07:13:29 UTC
Created attachment 397735 [details]
reproducer from Issue Tracker

Comment 16 john.haxby@oracle.com 2010-03-04 17:28:22 UTC
That patch, unlike the one in bug 554735 doesn't include support for Xen system calls.  I don't know if that is an issue for this.

Comment 17 john.haxby@oracle.com 2010-03-04 17:41:47 UTC
The patch in the -191 kernel is also broken: it won't fix the problem on xen kernels.   But it's nice to see it's otherwise identical to mine :-)

Comment 23 Chris Lalancette 2010-03-05 13:37:17 UTC
*** Bug 554735 has been marked as a duplicate of this bug. ***

Comment 24 Chris Lalancette 2010-03-05 13:38:41 UTC
I posted a patch to take care of the Xen side of this, so flipping back to POST.

Chris Lalancette

Comment 26 Jarod Wilson 2010-03-10 17:01:58 UTC
in kernel-2.6.18-192.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Please update the appropriate value in the Verified field
(cf_verified) to indicate this fix has been successfully
verified. Include a comment with verification details.

Comment 31 errata-xmlrpc 2010-03-30 07:28:56 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 therefore 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/RHSA-2010-0178.html


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