From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8E28720248 for ; Sat, 23 Mar 2019 11:59:32 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=VO+G8 CcVg1f4gSIhDncoU5L1D2cO93PLxCDefUyv/ZQS8dUnNVbyfmKQ35IbnmbEEnuHZ 5VPXEDg24Fvu6U1IPInayBpLSKT7DOSaiLxVR+uWyQT8kKtkqovPhvJCyDPMovZ0 jUIC0LutrKWigrSYqTSZTuDQde6wR+hiTiWybg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=bZtHVvOQWMh a9uZbxwHdNmT09YY=; b=ih6SkMU3FqiCnAg21mGvx9rL9MddXorVfC2LEfrgixP ocjJxsQgoGnniD8aFjE9izab1idWluAnl8zU/I9SvRViAPF1rTu6kz1F7H3+sWOx V6al9+c0isTaI1HlWrdHxXCKtz7UgxhpVhcV/S15mFCTFIR64EZros8SR/vrwOVw = Received: (qmail 123415 invoked by alias); 23 Mar 2019 11:59:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 123318 invoked by uid 89); 23 Mar 2019 11:59:28 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net Date: Sat, 23 Mar 2019 12:59:06 +0100 From: Lukasz Majewski To: Paul Eggert Cc: libc-alpha@sourceware.org, Joseph Myers Subject: Re: [PATCH v2 1/2] Y2038: make __mktime_internal compatible with __time64_t Message-ID: <20190323125906.699ce15e@jawa> In-Reply-To: <910c75f2-86ea-34cd-7279-71fcbf5edabc@cs.ucla.edu> References: <20190227112042.1794-1-lukma@denx.de> <20190312075856.33ac3c5b@jawa> <20190319143956.52f83a48@jawa> <910c75f2-86ea-34cd-7279-71fcbf5edabc@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/mPZX8IhqpE8Hew4.cYB1MNI"; protocol="application/pgp-signature" --Sig_/mPZX8IhqpE8Hew4.cYB1MNI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Paul, > Lukasz Majewski wrote: >=20 > > Shouldn't we have: return s =3D=3D t; ? =20 >=20 > Yes, absolutely. Thanks for catching that. I tested only the Gnulib > version, and Gnulib doesn't use that code. >=20 > Do you have glibc tests to catch bugs like this? If no, please add > writing some tests to your lists of things to do. Please find some patches to be applied on top of your patch to make the Y2038 system working: https://github.com/lmajewski/y2038_glibc/commits/mktime_v3_fixes In short: - The __time64_t needs to be exported to user space as it is a building block for Y2038 safe 32 bit systems' structures (like struct __timeval64). In the above use case the "normal" timeval is implicitly replaced with __timeval64. - The correct condition for "in_time_t_range()" - Some fixes necessary to make glibc building Please consider merging those changes to your patch. >=20 > > In the time/mktime.c there is: > > weak_alias (mktime, timelocal), which makes the timelocal calls > > aliases to mktime for time_t 32 and 64 bit (for Y2038 the proper > > __REDIRECT will be added). =20 >=20 > Sorry, I'm a bit lost here. How will that __REDIRECT work, exactly? > Should it be part of this patch, or part of a later patch? >=20 > >> Come to think of it, user code shouldn't see __time64_t > >> either.... =20 > >=20 > > Is that the reason for removing __time64_t definition from > > posix/bits/types.h ? =20 >=20 > Yes. > > In the time/mktime-internal.h you added a comment regarding BeOS > > users and posix time_t - do you know any :-) ? =20 >=20 > Just one. :-) See: >=20 > https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00470.html >=20 > Bruno's most recent BeOS-related submission to Gnulib was in October > 2017: >=20 > https://lists.gnu.org/r/bug-gnulib/2017-10/msg00098.html Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/mPZX8IhqpE8Hew4.cYB1MNI Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAlyWH4sACgkQAR8vZIA0 zr11ZwgAy89jClSE4Vz6XF1fA+LnFZj35Zi18KwXahezxR8BE+VHsXCop+DrvBzt QAXBYPwep67nS0ZHJVgeFiGS7WDsgz9h6Gs+ZG5PYQIuKPIaYW8bqczVsl8ky8ss CGgCadXhne0q32vATae9shUMAZifg88QgL32AhTI4YDHZnnEQoroJVkQ7adl3IvE qcoqZdX84Zo+2VCo8KYWwHJL6G7CPOeTH7kJT2VCURqCkU4eVV+hN2ovoqNgvkFN Zd1wYyLOWX/73AcjuZrIKe8pkduAodhy3nyH0W/TXzOwHH/Ow5LSH6fe29EMeEiC Sd0qX8qqDZNirV8j6Xwqqmqq35c8ug== =sy+e -----END PGP SIGNATURE----- --Sig_/mPZX8IhqpE8Hew4.cYB1MNI--