From patchwork Fri Dec 4 23:35:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 41316 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE3EE397A032; Fri, 4 Dec 2020 23:37:10 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id F09C03857816 for ; Fri, 4 Dec 2020 23:37:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F09C03857816 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CnpyS0r91z1qs0P; Sat, 5 Dec 2020 00:37:04 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CnpyR6FT9z1qqkk; Sat, 5 Dec 2020 00:37:03 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id rbhciEvNhJpw; Sat, 5 Dec 2020 00:37:01 +0100 (CET) X-Auth-Info: Q2dkMaZA8Roj5qlGTDA4Q4MKWBopuGi/M0OQNxNoNuY= Received: from localhost.localdomain (89-64-5-98.dynamic.chello.pl [89.64.5.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 5 Dec 2020 00:37:01 +0100 (CET) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [RFC 0/6] y2038: Prepare glibc to be Y2038 safe for 32 bit ports Date: Sat, 5 Dec 2020 00:35:58 +0100 Message-Id: <20201204233604.7430-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer , GNU C Library , Siddhesh Poyarekar , Andreas Schwab , Stepan Golosunov , Alistair Francis Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This patch series is the RFC for preparing glibc to be Y2038 safe on ports with __WORDSIZE=32 && __TIMESIZE!=64 (e.g. 32 bit ARM). First patch provides necessary definitions and redirections to achieve the above task. Following patches are adjustments to glibc to provide proper handling of 64 bit time in some exported and local structures. Those patches shall be applied before the first one is pulled. This patch set causes following Y2038 tests being all passed: https://github.com/lmajewski/y2038-tests/ Those tests are run as part of meta-y2038: https://github.com/lmajewski/meta-y2038/ Lukasz Majewski (6): y2038: Introduce _TIME_BITS flag to support 64 bit time on 32 bit systems y2038: stat: {f}stat{at}64_time64 redirection to be used on Y2038 systems y2038: Export struct_stat_time64_helper.h with Y2038 safe stat{64} content y2038: Enhance struct msqid_ds to support 64 bit time msqid: Provide internal copy of struct __msqid64_ds msg: provide glibc local copy of struct msqid_ds include/bits/types/struct_msqid64_ds.h | 36 +++++ include/features.h | 19 +++ io/Versions | 6 + io/sys/poll.h | 11 ++ io/sys/stat.h | 100 +++++++++++- io/utime.h | 15 ++ manual/creature.texi | 28 ++++ misc/Versions | 5 + misc/sys/select.h | 27 ++++ nptl/Versions | 15 ++ posix/Versions | 2 + posix/sched.h | 9 ++ posix/sys/wait.h | 20 +++ resolv/Versions | 3 + resolv/netdb.h | 11 ++ resource/Versions | 1 + resource/bits/types/struct_rusage.h | 5 + resource/sys/resource.h | 10 ++ rt/Versions | 7 + rt/aio.h | 25 ++- rt/mqueue.h | 25 +++ signal/Versions | 3 + signal/signal.h | 12 ++ socket/sys/socket.h | 11 ++ sysdeps/nptl/pthread.h | 117 ++++++++++++++ sysdeps/pthread/semaphore.h | 23 +++ sysdeps/pthread/threads.h | 33 ++++ sysdeps/unix/sysv/linux/Makefile | 3 +- sysdeps/unix/sysv/linux/Versions | 7 + sysdeps/unix/sysv/linux/bits/struct_stat.h | 17 +- .../linux/bits/struct_stat_time64_helper.h | 70 +++++++++ sysdeps/unix/sysv/linux/bits/time.h | 10 ++ sysdeps/unix/sysv/linux/bits/timex.h | 31 ++++ .../sysv/linux/bits/types/struct_msqid64_ds.h | 4 - .../sysv/linux/bits/types/struct_msqid_ds.h | 8 + .../linux/hppa/bits/types/struct_msqid_ds.h | 8 + sysdeps/unix/sysv/linux/include/sys/msg.h | 66 +++++++- .../unix/sysv/linux/m68k/bits/struct_stat.h | 16 ++ .../sysv/linux/microblaze/bits/struct_stat.h | 16 ++ .../unix/sysv/linux/mips/bits/struct_stat.h | 16 ++ .../linux/mips/bits/types/struct_msqid_ds.h | 12 +- .../sysv/linux/powerpc/bits/struct_stat.h | 48 ++++-- .../powerpc/bits/types/struct_msqid_ds.h | 8 + .../linux/sparc/bits/types/struct_msqid_ds.h | 8 + sysdeps/unix/sysv/linux/struct_stat_time64.h | 60 ++----- sysdeps/unix/sysv/linux/sys/timerfd.h | 22 +++ sysdeps/unix/sysv/linux/sys/timex.h | 37 ++++- .../unix/sysv/linux/x86/bits/struct_stat.h | 16 ++ sysvipc/Versions | 2 + sysvipc/sys/msg.h | 10 ++ sysvipc/sys/sem.h | 21 +++ sysvipc/sys/shm.h | 10 ++ time/Versions | 24 +++ time/bits/types/struct_timespec.h | 17 +- time/bits/types/struct_timeval.h | 5 + time/bits/types/time_t.h | 4 + time/sys/time.h | 91 +++++++++++ time/time.h | 146 ++++++++++++++++++ 58 files changed, 1294 insertions(+), 98 deletions(-) create mode 100644 include/bits/types/struct_msqid64_ds.h create mode 100644 sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h