[Bug 225324] errno.h does not define ETIME

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 19 18:52:50 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225324

            Bug ID: 225324
           Summary: errno.h does not define ETIME
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: greg at unrelenting.technology

We do not define the XSI STREAMS errors that are defined in NetBSD, Linux and
illumos:

https://github.com/IIJ-NetBSD/netbsd-src/blob/9df6a19369157a3aee2c2f9009ce074aab939a16/sys/sys/errno.h#L161-L165

https://github.com/torvalds/linux/blob/dda3e15231b35840fe6f0973f803cc70ddb86281/include/uapi/asm-generic/errno.h#L43-L46

https://github.com/illumos/illumos-gate/blob/4b8ee424cacf91875c8edca00ba30e7371c5f230/usr/src/uts/common/sys/errno.h#L118-L122

Of course no one cares about XSI STREAMS, but e.g. drivers originating from
Linux have (ab)used ETIME to mean whatever arbitrary timeout they wanted.

Currently, we have #define ETIME ETIMEDOUT in LinuxKPI (and
cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c).

The most notable drivers that rely on this are DRM/KMS graphics drivers. So
currently, Mesa has to do the #define ETIME ETIMEDOUT thing too, e.g.:

https://github.com/freebsd/freebsd-ports/blob/d778bff61a11b8062802417099e1d7b34256fb6a/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__gem.c

This is pretty bad, and Mesa upstream does not want to do that.

We need to either #define ETIME ETIMEDOUT in errno.h, or define it as a new
error number and get rid of #define ETIME ETIMEDOUT everywhere. The latter is
more "proper" (same distinction between the two as on other systems), but
slightly more painful (-CURRENT users would have to upgrade both
kernel/drm-next-kmod AND Mesa at the same time once).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list