From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130026 invoked by alias); 3 Mar 2020 18:01:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 130013 invoked by uid 89); 3 Mar 2020 18:01:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: esa3.hgst.iphmx.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1583258473; x=1614794473; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1A6eJr9jd/wJ8jYdiQT6wxPPILeNkUVrTxpjMTwzeYM=; b=WttscTrjTKGoBB8C67rqOfDD38OufFRLi+I2u5A3a35F3GKb4adem/Lf Ye8jB7y/vLUQLtU4HcFPSJ+qtFFBVTNDfM1ekit/OEAoi7ivu+SBeUXKE 1nJzXhTE79A8jftqIrx2vCwW4ZbhuzxSl5i8oybSFjfcwqXFwhNg1sV+G kLfbuP37CllcCUAmhKP8TR6tSuEApmrc7RsNjUMr50pomrtRAMQUh23dg F9uP70AYWCwRuL/lzkp2Qb8i9PlMvFbpV6xf4Kk1xFgZgwFi2t65CChVQ i2neDcqnRp9YG0K9kjpVvjgBYzGeJFfhemTWefV+5+BDE2+alJJgUDwLc g==; IronPort-SDR: Yomnic0QCrgSsHkNsT2AvF0l49apqeDA04ZmurCysKzgPFK5kn3m6Lzihg+MObM7DjSqd68sOA w+/7gJVAI5X3+2TIStOufUkg6xCgchmf2bOlBxKBiZ9nHxYjRcSgX5fnawi5vSm8gDz+ltuvmU rUiaA6dAmgFNl83uhVLZYtXwL9U2Qtvo92+zVYr+wWbUD9FOcP3rDik8WSu4vSJ2z1DHS75x1h Ry7V7AzjbAsTdWcZ5a+C1zTNttWsC53AmxT3TqlX8+CzGZmEdOB4hSkQBzih/rc7ia9s0TlEkA K4U= IronPort-SDR: aop4ufifaOYzNGCpCAxzeg2lEWii821UYmGFuVWxi9H1T3Kim9MMQLSTmzqpBWDHpZ5NckbmM8 bwmxzuVhPMW/DDm1zH0FLkeZWI7yjMQ0g7DlNBz5wy0/RIOmOmb7CMwoPQgOS0luSQr9+kZSu9 WE+HGoaoAiEuhtjM8EwjF4zWTzgt3L62ftYFORjdX8vPAK84otpAG7ptcFLAYR7IO/L5c8fclT kzWME+n6ZZNzLEt+CBQkz98vvxasLcgFjjt7TT4TCGiZj1hFumRl/RGeR0Ip3czlZdZVc2rZfk FcgrAlUeL5TuGzHQhh6FfR5f IronPort-SDR: BW2Z3BrfIrbNL0gUHtwDpB3oX7dJmjHeIP3vJT8DI+cx0t9QlnUwYvQcNqDQnOGHxGfY8wp2Qa ao42ihMSH8NKpWoApyGsxRs5ISPyhn2rkXeoiVNRYZQ5kDLBpkSeYIPb0xMuWUumh2vzrASHxr S0jtPBJPjvOfmlDOOoKIBahcRtuxtP/KngA5Sgu7IG7NGHk+XI4wKP/6TY4qS+Cqm1rohjbDuC TsGeR/YdjkrdLKLr3dDQmiYXaCdDmq9Hux46m5iI1MZf+5+SIV7gN7soy8X5l6Xn736oGXPt6b K2s= WDCIronportException: Internal From: Alistair Francis To: libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, Alistair Francis Subject: [PATCH v5 0/8] Always use 32-bit time_t for certain syscalls Date: Tue, 03 Mar 2020 18:01:00 -0000 Message-Id: <20200303175355.15770-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2020-03/txt/msg00035.txt On y2038 safe 32-bit systems the Linux kernel expects itimerval and rusage to use a 32-bit time_t, even though the other time_t's are 64-bit. This series converts getitimer, setitimer, getrusage and wait4 to be both y2038 safe and pass a 32-bit time_t based on the __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 macro. On 32-bit systems we will pass a 32-bit time to the kernel (no matter the time_t size). This is no change for most 64-bit architectures or 32-bit architectures with a 32-bit time_t. We can also remove the old Alpha functions as this is now handled genericly. This follows the standard y2038 conversion so that we don't break backwards compatibility but we expose a 64-bit version for y2038 safe architectrures (like RV32). This series was tested by running: ./scripts/build-many-glibcs.py ... compilers ./scripts/build-many-glibcs.py ... glibcs on my x86_64 machine. I also ran make check on RV32 and I only see a total of 10 test failures. I don't have a way to test this on Alpha, would someone mind testing it for me? v5: - Rebase on master Alistair Francis (8): sysv/linux: Rename alpha functions to be alpha specific time: Add a timeval with a 32-bit tv_sec and tv_usec time: Add a __itimerval64 struct sysv: Define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 linux: Use long time_t __getitimer/__setitimer resource: Add a __rusage64 struct linux: Use long time_t for wait4/getrusage sysv/alpha: Use generic __timeval32 and helpers bits/typesizes.h | 6 + include/sys/resource.h | 121 ++++++++++++++++++ include/time.h | 67 ++++++++++ sysdeps/unix/syscalls.list | 3 - .../unix/sysv/linux/alpha/bits/typesizes.h | 3 + sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 7 +- sysdeps/unix/sysv/linux/alpha/osf_getitimer.c | 3 +- sysdeps/unix/sysv/linux/alpha/osf_getrusage.c | 8 +- .../unix/sysv/linux/alpha/osf_gettimeofday.c | 4 +- sysdeps/unix/sysv/linux/alpha/osf_setitimer.c | 5 +- .../unix/sysv/linux/alpha/osf_settimeofday.c | 4 +- sysdeps/unix/sysv/linux/alpha/osf_utimes.c | 4 +- sysdeps/unix/sysv/linux/alpha/osf_wait4.c | 8 +- .../unix/sysv/linux/generic/bits/typesizes.h | 6 + sysdeps/unix/sysv/linux/getitimer.c | 59 +++++++++ sysdeps/unix/sysv/linux/getrusage.c | 58 +++++++++ sysdeps/unix/sysv/linux/s390/bits/typesizes.h | 6 + sysdeps/unix/sysv/linux/setitimer.c | 95 ++++++++++++++ .../unix/sysv/linux/sparc/bits/typesizes.h | 6 + .../unix/sysv/linux/{alpha => }/tv32-compat.h | 90 +++++-------- sysdeps/unix/sysv/linux/wait4.c | 50 +++++++- sysdeps/unix/sysv/linux/x86/bits/typesizes.h | 3 + 22 files changed, 536 insertions(+), 80 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/getitimer.c create mode 100644 sysdeps/unix/sysv/linux/getrusage.c create mode 100644 sysdeps/unix/sysv/linux/setitimer.c rename sysdeps/unix/sysv/linux/{alpha => }/tv32-compat.h (56%) -- 2.25.1