From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D8D5B3858415 for ; Fri, 5 Apr 2024 12:52:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8D5B3858415 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D8D5B3858415 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712321543; cv=none; b=cuWfjWdvh/8XwReL60f++vfgg+RQV+TLwuncqikvmP00yA/J/lVX16oYbS2waefdZuBMJ7WyeBrHQ+anWLp/mRuuMUUmi7A5pZFBkBsRFJDkZgDY9746cSyb1ymqWKCowohP5brlPoGCdARzrLSMVepdw0iRaUWpIUOywHqvNaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712321543; c=relaxed/simple; bh=52n7dWDXnWVCW6PCKTZN2Dh1VUtAT7asAz00vczWmJc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kMgZNaKfZ/7R8HyBemVmRT3Dyy/8iw+WkjekfKWy8oXkQflEYPOJM0V5O1vaDt/zrVgYdl7Ity1mr7eCXmSwCNw8eTKWqQMJmwesTnExHHW2gP32oUW0sb2MswHKP1/+ZX0SacLI4JxvfPbT7ipcz7Ns6NF2T5VKWAuoJaU/eeY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712321541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xH/X9K01aAEthpZshdbIbhNtzybeMxDJS07ckuR5LrQ=; b=S+Y+9bMNIQqv9+LAuzT7QBz2EqcFqgDc9NNVWwb2/HecHYe2oyfYRfxu1B5sTXjRGqFe3o r9VDssLvZwWiQA/AoWOhrmwA6yxmdZbT0qYnClhxi7JiE0gGvZi+8q/OaxYzMAOxwGR0uB UnUUb8G7u6ozHf2xlN6WImZqHwwiE8A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-127-qa9XG4qYMdu9jmhU-3TrfA-1; Fri, 05 Apr 2024 08:52:19 -0400 X-MC-Unique: qa9XG4qYMdu9jmhU-3TrfA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A8C9805AA1; Fri, 5 Apr 2024 12:52:19 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95608492BCB; Fri, 5 Apr 2024 12:52:18 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Netto Cc: Paul Eggert , libc-alpha@sourceware.org Subject: Re: [PATCH] login: Use unsigned 32-bit types for seconds-since-epoch In-Reply-To: <7399c560-3565-4b8a-b3ae-360fe074941b@linaro.org> (Adhemerval Zanella Netto's message of "Fri, 5 Apr 2024 09:46:52 -0300") References: <87sf02guiz.fsf@oldenburg.str.redhat.com> <6289d40a-7989-4869-8f47-553263e4df7a@cs.ucla.edu> <87jzld7lz8.fsf@oldenburg.str.redhat.com> <7399c560-3565-4b8a-b3ae-360fe074941b@linaro.org> Date: Fri, 05 Apr 2024 14:52:13 +0200 Message-ID: <87r0fk0y6a.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: * Adhemerval Zanella Netto: > On 04/04/24 02:09, Florian Weimer wrote: >> * Paul Eggert: >> >>> On 4/3/24 11:39, Florian Weimer wrote: >>>> For consistency, >>>> if there is a 64-bit architecture that is coinstallable, define >>>> __WORDSIZE_TIME64_COMPAT32 to 1 on the 32-bit architectyre as well. >>> >>> Could you explain the advantage of consistency here? User code almost >>> invariably assignes ut_tv.tv_sec to time_t (this is true of every >>> instance I found of ut_tv in Gnulib source code, for example). So >>> changing this field's type on platforms where time_t is 32 bits will >>> likely be ineffective in practice, and might cause more problems than >>> it cures. >> >> Few applications with a 32-bit time_t will work once there is a value in >> this field with the MSB set. So the relevant case is applications that >> were built with -D_TIME_BITS=64, and there the consistent behavior with >> the 64-bit architecture helps. > > This helps only architectures with __WORDSIZE_TIME64_COMPAT32, so it does > not really solve the issue for all legacy platforms. We can add more __WORDSIZE_TIME64_COMPAT32=1 definitions. > I still prefer if we just deprecate this whole interface, since from > other legacy ABI history (non-LFS interface) programs will keep using > it until something breaks. I don't disagree, I just want to give distributions the option to backport a reviewed patch with a workaround that appears not to require much application porting. I believe many of us are preparing toolchains for distributions that are running close to the 2038 cliff. Thanks, Florian