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=-3.9 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 428991F461 for ; Thu, 27 Jun 2019 16:17:10 +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=mZJh1 aLzIvoOp9jJtp7F0e3IsC+96VEEWcuFfu17mhBNn/N5hrz1FFXlavtKpsjc0wvdH vjs9t8q1jGcSWGmGm1bqaAZ5jh7ISbh3dQWXfhCdEXpLHRRAcxjUIhJ5WWYWzE7q lQXs3EjTCGvMS+AXsveeSNdvCsq3dHyL3Rj16M= 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=5vs+xOVwkNu 3Vp9yW2V2wYt8Q0Q=; b=iGXyMYogRmFoIwAXIWqIb3WJTIbxXFhz9b6TTK9m4nT nG4jX4PCZIUg99klvWoRADZCO+oi8vWgPfL91TMPSd2++EjAxhRkaGz4Ros4wKCd tZZCjRUccXm4rUdAFvuAcEkn0+4utL+RlJivkz+FhezBcpiLxIka8rAe5KsV7izs = Received: (qmail 43417 invoked by alias); 27 Jun 2019 16:17:07 -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 43401 invoked by uid 89); 27 Jun 2019 16:17:07 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net Date: Thu, 27 Jun 2019 18:16:54 +0200 From: Lukasz Majewski To: Arnd Bergmann Cc: Joseph Myers , Alistair Francis , GNU C Library , Adhemerval Zanella , Florian Weimer , Palmer Dabbelt , macro@wdc.com, Zong Li , Zong Li , Alistair Francis Subject: Re: [RFC v2 03/20] y2038: linux: Provide __clock_settime64 implementation Message-ID: <20190627181654.1d08392a@jawa> In-Reply-To: References: <4a1304510a5c9b5c2f6432bfdc5c9fd1740a081f.1561421042.git.alistair.francis@wdc.com> <20190625175125.03375ead@jawa> <20190626110711.64e8cd2f@jawa> <20190626170344.2c9d1d47@jawa> <20190627005517.418d26c2@jawa> <20190627123557.01356d4d@jawa> <20190627160758.6fe824cf@jawa> <20190627172333.1a979f6d@jawa> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/KF9=K2u59.HfHV.AJUyyVV0"; protocol="application/pgp-signature" --Sig_/KF9=K2u59.HfHV.AJUyyVV0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Arnd, > On Thu, Jun 27, 2019 at 5:23 PM Lukasz Majewski wrote: >=20 > > > > I think that it is not necessary as the patch [1] has following > > code: =20 >=20 > > #if __TIMESIZE =3D=3D 64 > > # define __clock_settime64 __clock_settime > > #else > > extern int __clock_settime64 (clockid_t clock_id, > > const struct __timespec64 *tp); > > libc_hidden_proto (__clock_settime64) > > #endif > > > > So for archs supporting 64 bit time syscalls (WORDSIZE=3D=3D64 && > > WORDSIZE_SYSCALLS=3D=3D64) we have the #define and the > > weak_alias (__clock_settime, clock_settime) does the job. =20 >=20 > Ok, so you redirect both __clock_settime64 to __clock_settime > and __NR_settime64 to __NR_settime, in order to get back to the > same definition that you have today on 64-bit. >=20 > Sorry for taking so long to understand that. Not only you had a hard time to understand it. The approach presented in this patch steams from following guidelines: https://www.gnu.org/software/libc/manual/html_mono/libc.html "D.2.1 64-bit time symbol handling in the GNU C Library" >=20 > > If you are interested, please look into patch [2], which is a > > proposition of using clock_settime as a part of Y2038 safe system. > > This code corresponds to v3 of adding clock_settime syscall support, > > which is a bit outdated as now we discuss v5. It gives a rough idea > > though. =20 >=20 > Yes, that part looked fine to me from the beginning. Ok. Good :-) >=20 > Arnd 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_/KF9=K2u59.HfHV.AJUyyVV0 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAl0U6/YACgkQAR8vZIA0 zr3T2Qf/fq6xRFoxyqzRaQ4BD2c+SaRVQN5VPzCo8s3pnX/OUYr6FVj1OwbrpRMe thQsbz8YWIGNzGH5h+JIGdV8LRqEc6NU0vNzLkpfyMMDDBG144EPUJDYcDw/uSJz hcyZG5EOKDgYHxTkgcFasRg5nRl3WyjOADcISa0O8twRhtSMFE3Dq5ey5UQwbFTw 9Zy0gLuKjZqKC8J1dlWe1Z7wxl6HTd9T28TAOSf5SJMLIOI1P2lf2Uzv0O7JWb4E hylzIKvh2010YjUnriHNKox6umXTpmHCpwlBdi/MX6GjhGjOoNtia/JCHjZqU4iu RxtIvDuxQjXPZqSZYq+mkbPnrYnxlQ== =qQ0l -----END PGP SIGNATURE----- --Sig_/KF9=K2u59.HfHV.AJUyyVV0--