From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 706B33858D38 for ; Sun, 23 Jul 2023 15:17:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 706B33858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org From: "Andreas K. Huettel" To: libc-alpha@sourceware.org, floppym@gentoo.org, adhemerval.zanella@linaro.org Subject: CONFIG_COMPAT_32BIT_TIME in the kernel, x86 ABI on x86-64 Date: Sun, 23 Jul 2023 17:16:55 +0200 Message-ID: <8005565.6fTUFtlzNn@pinacolada> Organization: Gentoo Linux MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5162398.yKrmzQ4Hd0"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --nextPart5162398.yKrmzQ4Hd0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; protected-headers="v1" From: "Andreas K. Huettel" Subject: CONFIG_COMPAT_32BIT_TIME in the kernel, x86 ABI on x86-64 Date: Sun, 23 Jul 2023 17:16:55 +0200 Message-ID: <8005565.6fTUFtlzNn@pinacolada> Organization: Gentoo Linux MIME-Version: 1.0 Dear all,=20 one of my Gentoo colleagues (Mike Gilbert, floppym) found this, so I'm forw= arding his notes: =3D=3D=3D Using utimensat as an example, the kernel interface is as follows: When CONFIG_COMPAT_32BIT_TIME is enabled, the kernel provides both the lega= ct=20 32-bit interface (utimensat) and the 64-bit interface (utimensat_time64). When CONFIG_COMPAT_32BIT_TIME is disabled, only the 64-bit interface=20 (utimensat_time64) is provided. utimensat gives ENOSYS. Behavior of utimensat64 libc function before b286eca5d4117b3e17c939e3df56e1= 32ae623df1: 1. Try utimensat_time64 2. If ENOSYS, fall back to utimensat if the arguments are small enough to f= it in 32-bits Behavior of utimensat64 libc function after b286eca5d4117b3e17c939e3df56e13= 2ae623df1: 1. If the arguments are small enough to fit in 32-bits, use utimensat 2. If the arguments are too large, use utimensat_time64 The new behavior fails when CONFIG_COMPAT_32BIT_TIME is disabled, since uti= mensat is=20 unavailable. Several other glibc functions were updated with similar behavior changes. =3D=3D=3D What's to do? Cheers, Andreas =2D-=20 Andreas K. H=FCttel dilfridge@gentoo.org Gentoo Linux developer (council, toolchain, base-system, perl, libreoffice) --nextPart5162398.yKrmzQ4Hd0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAABCgB9FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmS9RGdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZE MTlFNkQzMUIxOTJFRTREQzYzRUFEM0RDMkIxNjIxNUVENTQxMkEACgkQ3CsWIV7V QSopeA/9EuhR1p9YfbGgsw8kcBYhrlls8tEsCSAmdAJ4NmAtp+aS4m5QYYk21mmM sl6uzfG0DalZbply9siql+wzIEhZVu+SOgvg/oxmq6YxF97GHE4jJoRGxRp4z4x4 aYnCdq7GUgAPxiNRb/dvWKhmlUVv9EltgFTCZdvL6N9ttZ5ysjspC4BxNIPyN6hV WUX+iVVcxJeuGz4Ov1VPh7RLONFSjGs4rgobjT0Q842YTQUH6ZAKTBd8xGIOd9sk R/fm2dtKSc+c22eycbBOSIzLxkG+/DRPBkXNrOMviDED9gmtAgztUED874jf8Of8 11kRDdFzF3kboDosit2CXZpDRZiH4l/W3b100rRUD0capPJNbUR2kjDt9nUQzIDE p3InmI2kcKYG49DFvZrHmt88dEHDTPiUSRQF/T7OLOgbtFbgIhEKuowNSRmLqAd7 Js12S7twV0fkNb6kG6dj2MOKun3oU8ZPxRITHDdgvTE9+Gk0s7uXRq90mDbsxWTr 00LeZi/0ChYa/8NKdsksXFwNPAQWd1RN1XPY5r0a5WaZd8+UBKleexDyxp8sGjWV TE+1O9HLgyD65AbJXM/CtPUEnYuKmPVVZDYfhwiURTQkn/BUy/ecSbt4OpkKHmrP OoW5PIKbvfktEsPsI67SWcRkTutB/pQyh/zUjpn0svZe9DjS5/I= =kBu4 -----END PGP SIGNATURE----- --nextPart5162398.yKrmzQ4Hd0--