From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id 8F7ED3858436 for ; Fri, 4 Aug 2023 07:00:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F7ED3858436 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id D14673C011BD8; Fri, 4 Aug 2023 00:00:16 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yB1MxtDo8_BA; Fri, 4 Aug 2023 00:00:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 158153C011BE0; Fri, 4 Aug 2023 00:00:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 158153C011BE0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691132416; bh=d4Gk6znXoXY4t6Ku0GZw7DiEUeuILtuu5tnQYKaeV0U=; h=Message-ID:Date:MIME-Version:To:From; b=DF70PZBprFni92bmmHPmUZ1abcfgDOdUqoYuS0SVXUltM0zmSuwTLGYfbO9xiPIao KHzERp1JDEjs3Ndl4aNRmBtfo1hsms7+fIIPJBcGEHJbxoctuKGKvacdGG6zEFYM/T TPsTmkmZFTkB4YU8y2sW4TTcSf6nPjNtRVGq3htAL9OCdntzv3wRGyPN6lwnuMyqrP BeL4w+q36Svz03JDGmR5t6+xSbICF64zvm4n87ytaPL4B7qjUI6abewteslNePXL05 JEc/T4ZbvOTOxo09jnlLYX17TeJXXNE7FMNFYRAaHAswYX4TwHV06htagIJqH3I50P 6N7uvdt0Rxdrg== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KY6rOuwZsD3U; Fri, 4 Aug 2023 00:00:16 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id DE9613C011BD8; Fri, 4 Aug 2023 00:00:15 -0700 (PDT) Message-ID: Date: Fri, 4 Aug 2023 00:00:15 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Adhemerval Zanella Netto , libc-alpha , Bruno Haible , Thorsten Kukuk References: From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: utmp 64 bit time_t support In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-08-01 13:28, Adhemerval Zanella Netto via Libc-alpha wrote: > The gnulib developers has reported that the lack of 64-bit support on utmp > records has created some real issues [1]. This issue is problematic because > now some 32-bit architectures when built with 64-bit time_t support have > a different utmp struct size, which essentially breaks __WORDSIZE_TIME64_COMPAT32 > support. The simple straightforward fix would to make utmp/utmpx always 32-bit > for theses architecture (mips, mips64n32, riscv32, sparcv9, and i686) but this > would be an ABI break. Isn't there a less-simple but still reasonably-straightforward fix that wouldn't break the ABI? On these traditionally-32-bit time_t platforms when _TIME_BITS=64, do what Gnulib is doing[8], namely, convert from file format to internal format while reading the utmp data. Obviously this Gnulib hack won't work after the year 2038, but it's still a win because struct utmpx doesn't work today. That is, with current glibc, utmpx-using programs fail today if compiled with _TIME_BITS=64 on 32-bit platforms. This is why I filed glibc bug 30701. I suspect this bug will need to be fixed regardless of whether utmpx becomes deprecated in the next glibc release. > [1] https://sourceware.org/bugzilla/show_bug.cgi?id=30701 > [2] https://github.com/thkukuk/utmpx/blob/main/Y2038.md > [3] https://sourceware.org/bugzilla/show_bug.cgi?id=28146 > [4] https://sourceware.org/bugzilla/show_bug.cgi?id=17470 > [5] https://sourceware.org/bugzilla/show_bug.cgi?id=24492 > [6] https://sourceware.org/pipermail/libc-alpha/2020-July/116742.html > [7] https://sourceware.org/pipermail/libc-alpha/2020-July/116764.html [8]: https://lists.gnu.org/r/bug-gnulib/2023-07/msg00159.html