From: Alistair Francis <alistair23@gmail.com>
To: Alistair Francis <alistair.francis@wdc.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH v5 0/3] Support y2038 semctl_syscall()
Date: Thu, 16 Apr 2020 09:23:58 -0700 [thread overview]
Message-ID: <CAKmqyKPyuuvU4qjPr2Q9Luyvx-p8_CQNrzhjo6qBqnyLiQjKFw@mail.gmail.com> (raw)
In-Reply-To: <20200401165308.1913271-1-alistair.francis@wdc.com>
On Wed, Apr 1, 2020 at 10:01 AM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> This series does three things:
> 1. Creates a bits/semid_ds_t.h file (in every arch) that specifies
> struct semid_ds so we no longer have to use macros defined in
> sem-pad.h.
> 2. Removes the sem-pad.h file as it is no longer needed.
> 3. Adds a new __semid_ds32 that is passed to the kernel (as part of
> a union) when running on 32-bit systems. If we are doing an
> IPC_STAT command then the 32-bit sem_{c,o}time{_high} values are
> combined to create a 64-bit value.
>
> The semctl_syscall() function passes a union semun to the kernel. The
> union includes struct semid_ds as a member. On 32-bit architectures the
> Linux kernel provides a *_high version of the 32-bit sem_otime and
> sem_ctime values. These can be combined to get a 64-bit version of the
> time.
>
> This patch adjusts the struct semid_ds to support the *_high versions
> of sem_otime and sem_ctime. For 32-bit systems with a 64-bit time_t
> this can be used to get a 64-bit time from the two 32-bit values.
>
> 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 9 test failures.
Ping!
>
> v5:
> - Address v4 review comments
> - Set the semid_ds struct from a temp struct
> v4:
> - Remove the __IPC_TIME64 macro
> - It was only used once and doesn't work if __IPC_64 is 0 (which is
> usually is)
> - Address failures pointed out by Vineet Gupta
>
> Alistair Francis (3):
> bits/sem.h: Split out struct semid_ds
> semctl: Remove the sem-pad.h file
> sysv: linux: Pass 64-bit version of semctl syscall
>
> sysdeps/unix/sysv/linux/Makefile | 3 +-
> sysdeps/unix/sysv/linux/bits/sem-pad.h | 33 -------------
> sysdeps/unix/sysv/linux/bits/sem.h | 26 +----------
> .../sysv/linux/bits/types/struct_semid_ds.h | 46 +++++++++++++++++++
> .../linux/hppa/bits/types/struct_semid_ds.h | 46 +++++++++++++++++++
> .../unix/sysv/linux/hppa/struct__semid_ds32.h | 32 +++++++++++++
> .../bits/types/struct_semid_ds.h} | 20 +++++---
> .../{bits/sem-pad.h => struct__semid_ds32.h} | 20 +++++---
> .../unix/sysv/linux/powerpc/bits/sem-pad.h | 26 -----------
> .../powerpc/bits/types/struct_semid_ds.h | 46 +++++++++++++++++++
> .../sysv/linux/powerpc/struct__semid_ds32.h | 32 +++++++++++++
> sysdeps/unix/sysv/linux/semctl.c | 30 ++++++++++--
> .../linux/sparc/bits/types/struct_semid_ds.h | 46 +++++++++++++++++++
> .../sysv/linux/sparc/struct__semid_ds32.h | 32 +++++++++++++
> sysdeps/unix/sysv/linux/struct__semid_ds32.h | 32 +++++++++++++
> sysdeps/unix/sysv/linux/x86/bits/sem-pad.h | 24 ----------
> .../bits/types/struct_semid_ds.h} | 22 ++++++---
> .../unix/sysv/linux/x86/struct__semid_ds32.h | 32 +++++++++++++
> 18 files changed, 415 insertions(+), 133 deletions(-)
> delete mode 100644 sysdeps/unix/sysv/linux/bits/sem-pad.h
> create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h
> create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h
> create mode 100644 sysdeps/unix/sysv/linux/hppa/struct__semid_ds32.h
> rename sysdeps/unix/sysv/linux/{sparc/bits/sem-pad.h => mips/bits/types/struct_semid_ds.h} (56%)
> rename sysdeps/unix/sysv/linux/mips/{bits/sem-pad.h => struct__semid_ds32.h} (52%)
> delete mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/sem-pad.h
> create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h
> create mode 100644 sysdeps/unix/sysv/linux/powerpc/struct__semid_ds32.h
> create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h
> create mode 100644 sysdeps/unix/sysv/linux/sparc/struct__semid_ds32.h
> create mode 100644 sysdeps/unix/sysv/linux/struct__semid_ds32.h
> delete mode 100644 sysdeps/unix/sysv/linux/x86/bits/sem-pad.h
> rename sysdeps/unix/sysv/linux/{hppa/bits/sem-pad.h => x86/bits/types/struct_semid_ds.h} (52%)
> create mode 100644 sysdeps/unix/sysv/linux/x86/struct__semid_ds32.h
>
> --
> 2.26.0
>
prev parent reply other threads:[~2020-04-16 16:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 16:53 Alistair Francis
2020-04-01 16:53 ` [PATCH v5 1/3] bits/sem.h: Split out struct semid_ds Alistair Francis
2020-04-17 18:06 ` Adhemerval Zanella
2020-04-01 16:53 ` [PATCH v5 2/3] semctl: Remove the sem-pad.h file Alistair Francis
2020-04-17 19:03 ` Adhemerval Zanella
2020-04-17 20:38 ` Alistair Francis
2020-04-20 20:18 ` Adhemerval Zanella
2020-04-20 20:25 ` Alistair Francis
2020-04-21 14:03 ` Adhemerval Zanella
2020-04-22 19:22 ` Adhemerval Zanella
2020-04-01 16:53 ` [PATCH v5 3/3] sysv: linux: Pass 64-bit version of semctl syscall Alistair Francis
2020-04-21 20:52 ` Stepan Golosunov
2020-04-22 21:25 ` Adhemerval Zanella
2020-04-28 21:59 ` Alistair Francis
2020-04-22 21:25 ` Adhemerval Zanella
2020-04-16 16:23 ` Alistair Francis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKmqyKPyuuvU4qjPr2Q9Luyvx-p8_CQNrzhjo6qBqnyLiQjKFw@mail.gmail.com \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).