Bug 453394 - [RHEL5.2]: Running strace with a bad syscall doesn't return -ENOSYS
Summary: [RHEL5.2]: Running strace with a bad syscall doesn't return -ENOSYS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen
Version: 5.2
Hardware: All
OS: Linux
urgent
low
Target Milestone: rc
: ---
Assignee: Chris Lalancette
QA Contact: Martin Jenner
URL:
Whiteboard:
: 459442 461349 (view as bug list)
Depends On:
Blocks: 449772 470853
TreeView+ depends on / blocked
 
Reported: 2008-06-30 11:18 UTC by Chris Lalancette
Modified: 2009-01-20 19:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 19:35:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:0225 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.3 kernel security and bug fix update 2009-01-20 16:06:24 UTC

Description Chris Lalancette 2008-06-30 11:18:42 UTC
Description of problem:
If you take the following program:

#include <stdio.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <sys/types.h>

int main()
{
        int foo;

        foo = syscall(289);

        fprintf(stderr, "Error is %d\n",foo);

        return 0;
}

and compile and run it on the RHEL 5.2 xen kernel, you will get -1 as the output
from the syscall, since 289 is not a valid syscall in RHEL-5.  Now, if you take
that same program and run it under strace, you will get a return value of 289,
which is wrong.  This is because of a minor bug in
arch/x86_64/kernel/entry-xen.S, where if we are tracing the syscall, we copy
that syscall number into the return instead of the appropriate -ENOSYS.  This
bug is also present in the upstream Xen 2.6.18 kernel, but is fixed in the
upstream Linux kernel.

Comment 1 Chris Lalancette 2008-06-30 11:44:30 UTC
Oh, I should mention that this came out of the discussion of BZ 442352, although
I do not believe it is the root cause of that issue.

Chris Lalancette

Comment 2 RHEL Program Management 2008-06-30 11:57:31 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Don Zickus 2008-07-18 20:07:50 UTC
in kernel-2.6.18-98.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 5 Chris Lalancette 2008-08-28 18:59:19 UTC
*** Bug 459442 has been marked as a duplicate of this bug. ***

Comment 9 Orion Poplawski 2008-09-08 14:24:38 UTC
*** Bug 461349 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2009-01-20 19:35:15 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-2009-0225.html


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