Bug 453394
| Summary: | [RHEL5.2]: Running strace with a bad syscall doesn't return -ENOSYS | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Chris Lalancette <clalance> |
| Component: | kernel-xen | Assignee: | Chris Lalancette <clalance> |
| Status: | CLOSED ERRATA | QA Contact: | Martin Jenner <mjenner> |
| Severity: | low | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 5.2 | CC: | andreas.bierfert, dmair, orion, xen-maint |
| Target Milestone: | rc | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-01-20 19:35:15 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 449772, 470853 | ||
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 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. in kernel-2.6.18-98.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 *** Bug 459442 has been marked as a duplicate of this bug. *** *** Bug 461349 has been marked as a duplicate of this bug. *** 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 |
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.