Bug 224130 - unistd.h defines _syscall macros using undefined MAX_ERRNO
unistd.h defines _syscall macros using undefined MAX_ERRNO
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
Brian Brock
Depends On:
Blocks: 427887
  Show dependency treegraph
Reported: 2007-01-24 06:04 EST by Mark Wielaard
Modified: 2008-02-07 23:28 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-07 23:28:24 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 Mark Wielaard 2007-01-24 06:04:55 EST
Description of problem:

/usr/include/asm-x86_64/unistd.h defines the _syscall6 macros using
__syscall_return which is defined as follows:

#define __syscall_return(type, res) \
do { \
        if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
                errno = -(res); \
                res = -1; \
        } \
        return (type) (res); \
} while (0)

MAX_ERRNO is not defined, nor is there any definition found in any other public
header. This means that programs that have to use the _syscall macros directly
because they cannot use the glibc syscall() function now cannot compile anymore
unless they define MAX_ERRNO themselves (looking at the kernel sources it seems
the correct definition on x86_64 is 4095, which was also the value used pre 2.6.19).

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

Name   : kernel-headers
Arch   : x86_64
Version: 2.6.19
Release: 1.2895.fc6
Comment 1 Pete Zaitcev 2007-01-24 11:37:17 EST
You must not include anything from asm/ or linux/ into a user mode program.

You can use the definition as a basis to write your own.
Comment 2 Mark Wielaard 2007-01-24 14:44:55 EST
This is related to this upstream Frysk bug btw:
Comment 3 David Woodhouse 2007-02-03 16:29:33 EST
The bogus _syscallX macros were removed from the 2.6.18 kernel but the x86_64
maintainer sneaked them back in to 2.6.19. We should remove them again -- they
are removed again from upstream.
Comment 4 Jon Stanley 2008-01-07 20:50:10 EST
(This is a mass-update to all current FC6 kernel bugs in NEW state)


I'm reviewing this bug list as part of the kernel bug triage project, an attempt
to isolate current bugs in the Fedora kernel.


I am CC'ing myself to this bug, however this version of Fedora is no longer

Please attempt to reproduce this bug with a current version of Fedora (presently
Fedora 8). If the bug no longer exists, please close the bug or I'll do so in a
few days if there is no further information lodged.

Thanks for using Fedora!
Comment 5 Jon Stanley 2008-02-07 23:28:24 EST
Per the previous comment in this bug, I am closing it as INSUFFICIENT_DATA,
since no information has been lodged for over 30 days.

Please re-open this bug or file a new one if you can provide the requested data,
and thanks for filing the original report!

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