[Bug libc/10840] New: glibc could now fix broken F_GETOWN

View: New views
4 Messages — Rating Filter:   Alert me  

[Bug libc/10840] New: glibc could now fix broken F_GETOWN

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Userspace has long lived with a limitation in the system call convention
employed on Linux/x86 and some other architectures that means that if a file
descriptor is owned by a process group ID less than 4096, then, instead of
returning that ID as a negative function result from fcntl() F_GETOWN, glibc
misinterprets it as a system call error. This is because glibc (has little
choice but to) interpret negative system call returns in the range -1 to -4095
as indicating an error. This limitation means that an application that uses
process groups to receive "I/O possible" signals can't reliably use F_GETOWN to
discover which process group owns a file descriptor. Starting with kernel
2.6.32, Linux adds F_GETOWN_EX, which provides a way of returning the owner of a
file descriptor via a structure (f_owner_ex), which AFAICS means that glibc
could since Linux 2.6.32 intercept F_GETOWN operations and use F_GETOWN_EX to
ensure that the right value is returned to userspace.

--
           Summary: glibc could now fix broken F_GETOWN
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: mtk dot manpages at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10840

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10840] glibc could now fix broken F_GETOWN

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From drepper at redhat dot com  2009-10-29 17:14 -------
Fixed in git.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10840

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10840] glibc could now fix broken F_GETOWN

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From schwab at linux-m68k dot org  2009-10-29 17:15 -------
Note that F_[SG]ETOWN_EX are not usable yet because their values clash with
F_[GS]ETLK64.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10840

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10840] glibc could now fix broken F_GETOWN

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From mtk dot manpages at gmail dot com  2009-10-31 09:08 -------
Thanks!

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10840

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.