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.1 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 9B32F1F462 for ; Tue, 28 May 2019 22:09:36 +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=a21MQ Vma5Oa4qFcsHZnr2HqXRryOV7qJ6a2xKSXBGDnDa1Q+ZUXKJOnOwYdmKTA7q7F6L nsUzjILaAvcy1DY5RLPS9Krds3/84BGLHH2ngJutsnEJ5fcT8ySGYNibWHqHTzIO Ra/8Lstv0Bl+Idb1XFC5dvqYCin9GHTZ/sUFKU= 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=arCGlfqWGH6 3R3Q9/BGBc2hQArI=; b=cCrD3VEeZeIEYBC3tdUvV/69cU2oDc6nFerUXmFMiOx Vfnyd/lT8ECaQqTk0soETKwPmZ0khoFMpMkNGnJ7dXHcrk9zBawdELJmPwPWqt+D 0B/aG5yq4RV9dqx3s1Kc27OZEdACcFcLnvj+a4xteFExAm3xcMydatkmXqDxes4k = Received: (qmail 83320 invoked by alias); 28 May 2019 22:09:34 -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 83312 invoked by uid 89); 28 May 2019 22:09:34 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net Date: Wed, 29 May 2019 00:09:14 +0200 From: Lukasz Majewski To: Joseph Myers Cc: Stepan Golosunov , , Arnd Bergmann , Paul Eggert Subject: Re: [PATCH v5] y2038: Introduce __ASSUME_TIME64_SYSCALLS define Message-ID: <20190529000914.2d02c183@jawa> In-Reply-To: References: <20190414220841.20243-1-lukma@denx.de> <20190515142723.20182-1-lukma@denx.de> <20190523073448.2kf5wwrhf3iqlyty@sghpc.golosunov.pp.ru> <20190523113530.6b4a3c60@jawa> <20190525194555.7ecappollxdokizk@sghpc.golosunov.pp.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/8cLFzu2IcK4qJEaz5_UDugf"; protocol="application/pgp-signature" --Sig_/8cLFzu2IcK4qJEaz5_UDugf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Joseph, > On Sat, 25 May 2019, Stepan Golosunov wrote: >=20 > > In most cases code can look like this: > >=20 > > #ifdef __ASSUME_TIME64_SYSCALLS > > #ifndef __NR_clock_settime64 > > #define __NR_clock_settime64 __NR_clock_settime > > #endif > > INLINE_SYSCALL_CALL (clock_settime64, =E2=80=A6) > > #else > > try clock_settime64, if that fails (whether compiletime or runtime) > > convert data to 32-bit, call clock_settime > > #endif > >=20 > > (Yes, for semtimedop it won't be that simple. Because traditional > > syscall isn't semtimedop in some cases. This also assumes that > > the =20 >=20 > If we follow this approach, it would be reasonable to say that=20 > __ASSUME_TIME64_SYSCALLS is *only* for those syscalls where the old=20 > syscall, on platforms that had 64-bit time in their syscall interface > all along, is exactly equivalent (and to list that subset)=20 Yes, I do agree. Also those syscalls shall be explicitly listed in the commit message and code (as comments). > - not for=20 > semtimedop. Then there could be a separate > __ASSUME_SEMTIMEDOP_TIME64. >=20 > > 20 time64 syscall names won't suddenly be added to kernel headers > > for 64-bit ABIs.) =20 >=20 > Rather, that they won't be added *with new syscall numbers*. If the=20 > kernel adds them as macro aliases for the old syscall numbers, code > like that would work just fine. If the kernel adds them as new > syscall numbers, the definition of __ASSUME_TIME64_SYSCALLS (that > assumes it can always be true for existing 64-bit syscall ABIs) would > suddenly become wrong when using new kernel headers, because it would > result in glibc code using new syscall numbers without regard to a > possibly older runtime kernel version. >=20 Maybe I'm missing something, but would there be any use case (possibility) that for archs supporting 64 bit time ABI (and using e.g. __NR_clock_settime now) the new syscalls (like __NR_clock_settime64), with the same functionality, would be added with different numbers? Why already perfectly working __NR_clock_settime would be replaced by other syscall (like __NR_clock_settime64) not with alias but different number (on e.g x86_64)? I always thought that __NR_clock_settime64 would be added on archs with __WORDSIZE=3D=3D32 to allow them to work after Y2038 and hence there would be no chance for such collision. 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_/8cLFzu2IcK4qJEaz5_UDugf Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAlztsYsACgkQAR8vZIA0 zr3S1AgA1rq0TO/fwAf/xhE5wKJP2FybdeKB3X+nxFL5mHUIcGHks29fDzr45ZIP SHwo/dXd8LyZZw9S26sRTqcbXilhHkZ2TMpcgDziEx/8pqLHzbJbnsUMqSuKdYGR wRjM74eDIwoeKyDom4snQ3R4GSa5Ld8OHnjOwWWy/eGrS5BI161Cdk5KQ7ow7NZW 45mazFAO3dwbqQpNnlS9XEhXPo619pholT0ox8ircYVcDRlm0vSJepJy6NdC9pp3 cmUF9MKu7ah8gAvQRBlXMyRHltFMzlxcy2BoZTs0ERctYfAqoTunq2slMEmLDT3E 88GylmuuMbI8AclJ+r68d4y6cbC7hg== =Iuxw -----END PGP SIGNATURE----- --Sig_/8cLFzu2IcK4qJEaz5_UDugf--