From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zimbra.cs.ucla.edu (zimbra.cs.ucla.edu [131.179.128.68]) by sourceware.org (Postfix) with ESMTPS id B950C3858CDB for ; Sat, 12 Nov 2022 18:33:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B950C3858CDB 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 zimbra.cs.ucla.edu (Postfix) with ESMTP id 09A93160072; Sat, 12 Nov 2022 10:33:43 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gqV4dJ3ZDAzC; Sat, 12 Nov 2022 10:33:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E2970160079; Sat, 12 Nov 2022 10:33:41 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu E2970160079 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1668278022; bh=xlKooi1GvkX6EbZjOXuUzsEge3tEB3XGJc0QQwUhCls=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type: Content-Transfer-Encoding; b=i+GS0ixkytPxntwYmTNwDdS26F7yvkPQCsSyeLicQEbYbpmnvF8gCYMZcUQjxrx2I YIWfiC9EqgM1iyAxC+teeDVMbbF9WRFbyrncdlgk2BDTJFhqIa/IpSZt87JmMfsxZT vCoavYDFqN4aCFI3QO4Pzgq7doX+8WN6j/C6/35I= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2ZM9UbRES9gJ; Sat, 12 Nov 2022 10:33:41 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1BD2E160072; Sat, 12 Nov 2022 10:33:40 -0800 (PST) Message-ID: <453b3ac2-5486-73d2-c9f0-d6594351edec@cs.ucla.edu> Date: Sat, 12 Nov 2022 10:33:40 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: Wookey , Florian Weimer Cc: Sam James , Carlos O'Donell via Libc-alpha , autoconf@gnu.org, c-std-porting@lists.linux.dev, Zack Weinberg , David Seifert , Gentoo Toolchain , =?UTF-8?Q?Arsen_Arsenovi=c4=87?= , Frederic Berat , Arnd Bergmann , Helmut Grohne References: <87wn81q254.fsf@oldenburg.str.redhat.com> <20221112042052.GL27919@mail.wookware.org> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: On time64 and Large File Support In-Reply-To: <20221112042052.GL27919@mail.wookware.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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: On 2022-11-11 20:20, Wookey wrote: > It doesn't seem right to me that AC_SYS_LARGEFILE should imply > AC_SYS_YEAR2038. What is the reasoning behind that? First, in Autoconf git AC_SYS_LARGEFILE does not imply AC_SYS_YEAR2038. The former is willing to fall back on 32-bit time_t if 64-bit is not available. The latter errors out unless 64-bit time_t is available. Second and to answer your question, the intent of AC_SYS_LARGEFILE has always been, "I want open, stat, lseek, etc. to work on all files, and I don't want them to fail with errno==EOVERFLOW simply because my integer types are too narrow". For this to work with glibc 2.34+ on x64 and arm GNU/Linux, time_t must be 64 bits just as off_t, dev_t etc must be 64 bits; otherwise syscalls like 'stat' stop working on some files. These failures can have security implications. Many software developers, even in the security arena, haven't thought through the implications of EOVERFLOW and their programs do the wrong thing with EOVERFLOW.