Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 234426 - LSPP: Interrupted syscalls do not have the correct errno value in the audit log
Summary: LSPP: Interrupted syscalls do not have the correct errno value in the audit log
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Eric Paris
QA Contact: Martin Jenner
Depends On:
Blocks: 425461
TreeView+ depends on / blocked
Reported: 2007-03-29 05:31 UTC by Paul Moore
Modified: 2008-05-21 14:42 UTC (History)
5 users (show)

Fixed In Version: RHBA-2008-0314
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-05-21 14:42:14 UTC
Target Upstream Version:

Attachments (Terms of Use)
Simple test case (deleted)
2007-05-07 14:31 UTC, Paul Moore
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0314 normal SHIPPED_LIVE Updated kernel packages for Red Hat Enterprise Linux 5.2 2008-05-20 18:43:34 UTC

Description Paul Moore 2007-03-29 05:31:07 UTC
Description of problem:
If a syscall is interrupted by a signal the errno value recorded in the audit 
log is -512 (-ERESTARTSYS) which is a private, kernel-only errno value and 
does not reflect what is seen in userspace, 4 (EINTR).  I would expect that 
the errno value recorded in the audit log should match what is seen in 

Version-Release number of selected component (if applicable):
RHEL5 lspp.70 kernel

How reproducible:
Every time, both if syscall is restarted or not

Steps to Reproduce:
1. Run an application which does the following:
   * Installs a signal handler for SIGALRM
   * Disable syscall restarts for SIGALRM
   * Set an alarm for a future time
   * Block in a syscall
2. Check audit logs and notice that the syscall failed with errno=-512
Actual results:
The audit log reports an errno of -512 (-ERESTARTSYS).

Expected results:
The audit log reports an errno of -4 (-EINTR).

Additional info:
This bug is *not* blocking the LSPP certification efforts of HP, Red Hat, and 

Comment 1 Jay Turner 2007-05-03 19:17:43 UTC
QE ack for RHEL5.1.  Would be good to get a testcase generated and aligned
against this issue.

Comment 2 Paul Moore 2007-05-07 14:31:25 UTC
Created attachment 154267 [details]
Simple test case

As outlined in the original bug description, the test for this is rather
trivial; a crude test case is attached.  Simply compile the testcase, run the
resulting binary, and wait for it to timeout via the self-generated alarm
signal.  Check the audit log and viola, one strange audit record.

Comment 6 RHEL Product and Program Management 2007-11-01 18:25:36 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

Comment 7 Eric Paris 2007-11-14 20:23:03 UTC
potential patch sent to linux-audit Nov 14 from Eric Paris

Comment 9 Don Zickus 2008-01-10 20:39:42 UTC
in 2.6.18-66.el5
You can download this test kernel from

Comment 11 Mike Gahagan 2008-05-05 20:44:26 UTC
verified using the test case on the -92.el5 kernel.

Comment 13 errata-xmlrpc 2008-05-21 14:42:14 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 the 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.