Bug 453394 - [RHEL5.2]: Running strace with a bad syscall doesn't return -ENOSYS
[RHEL5.2]: Running strace with a bad syscall doesn't return -ENOSYS
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen (Show other bugs)
All Linux
urgent Severity low
: rc
: ---
Assigned To: Chris Lalancette
Martin Jenner
: ZStream
: 459442 461349 (view as bug list)
Depends On:
Blocks: 449772 470853
  Show dependency treegraph
Reported: 2008-06-30 07:18 EDT by Chris Lalancette
Modified: 2009-01-20 14:35 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 14:35:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Lalancette 2008-06-30 07:18:42 EDT
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 07:44:30 EDT
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 Product and Program Management 2008-06-30 07:57:31 EDT
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
Comment 4 Don Zickus 2008-07-18 16:07:50 EDT
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 14:59:19 EDT
*** Bug 459442 has been marked as a duplicate of this bug. ***
Comment 9 Orion Poplawski 2008-09-08 10:24:38 EDT
*** Bug 461349 has been marked as a duplicate of this bug. ***
Comment 16 errata-xmlrpc 2009-01-20 14:35:15 EST
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.


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