[Bug libc/24532] New: conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] New: conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

            Bug ID: 24532
           Summary: conform/arpa/inet.h failures due to linux kernel
                    64-bit time_t changes
           Product: glibc
           Version: 2.30
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: wilson at gcc dot gnu.org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

As part of the 64-bit time_t y2038 changes, the linux kernel modified
asm-generic/socket.h to include linux/posix_types.h.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/uapi/asm-generic/socket.h?h=v5.1&id=a623a7a1a5670c25a16881f5078072d272d96b71

Unfortunately, linux/posix_types.h defines a structure with a field called
fds_bits.  It also includes asm-generic/posix_types.h which defines a structure
with a field called val.  The existence of these two structure fields is
causing me to see conform failures.

In the make check output I see
FAIL: conform/POSIX2008/arpa/inet.h/conform
FAIL: conform/POSIX2008/netdb.h/conform
FAIL: conform/POSIX2008/netinet/in.h/conform
FAIL: conform/POSIX2008/sys/socket.h/conform
which then repeats for four other standard versions for a total of 20 failures.

In conform/POSIX2008/arpa/inet.h/conform.out I see
    Namespace violation: "fds_bits"
    Namespace violation: "val"
FAIL: Namespace of <arpa/inet.h>
and similarly for the other header files.

I'm seeing these failures on a RISC-V Fedora Core 30 system, with 5.1.0 linux
kernel headers, building top of tree glibc sources, and running make check.

Maybe this is actually a linux kernel bug, but it is glibc make check that is
broken, so I thought I would start here.  I don't know how these linux/glibc
interaction problems are dealt with normally.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I just chased this up on linux-api as a patch was posted there on 19 March
but somehow failed to get into the 5.1 release.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

--- Comment #2 from Jim Wilson <wilson at gcc dot gnu.org> ---
Thanks for the pointer to the linux-api mailing list.  I found the patch
discussion there.  That patch should fix my problem.  I also downloaded a
linux-5.1 tarball and double checked, I don't see the patch there.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

Andreas Schwab <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #3 from Andreas Schwab <[hidden email]> ---
*** Bug 24752 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
I've nominated this as a release blocker.  I'm working on a fix.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Florian Weimer <[hidden email]>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7854ebf8ed18180189c335f6f499fe9322458f0b

commit 7854ebf8ed18180189c335f6f499fe9322458f0b
Author: Florian Weimer <[hidden email]>
Date:   Wed Jul 24 10:59:34 2019 +0200

    Linux: Use in-tree copy of SO_ constants for !__USE_MISC [BZ #24532]

    The kernel changes for a 64-bit time_t on 32-bit architectures
    resulted in <asm/socket.h> indirectly including <linux/posix_types.h>.
    The latter is not namespace-clean for the POSIX version of
    <sys/socket.h>.

    This issue has persisted across several Linux releases, so this commit
    creates our own copy of the SO_* definitions for !__USE_MISC mode.

    The new test socket/tst-socket-consts ensures that the copy is
    consistent with the kernel definitions (which vary across
    architectures).  The test is tricky to get right because CPPFLAGS
    includes include/libc-symbols.h, which in turn defines _GNU_SOURCE
    unconditionally.

    Tested with build-many-glibcs.py.  I verified that a discrepancy in
    the definitions actually results in a failure of the
    socket/tst-socket-consts test.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24532] conform/arpa/inet.h failures due to linux kernel 64-bit time_t changes

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24532

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.30

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for glibc 2.30.

--
You are receiving this mail because:
You are on the CC list for the bug.