public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/9] converting system calls to 64-bit time_t, part 2
@ 2015-05-20 15:12 Arnd Bergmann
  2015-05-20 15:08 ` [PATCH 3/9] y2038: mips: extend sysvipc data structures Arnd Bergmann
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Arnd Bergmann @ 2015-05-20 15:12 UTC (permalink / raw)
  To: y2038
  Cc: baolin.wang, albert.aribaud, john.stultz, bamvor.zhangjian,
	ruchandani.tina, linux-api, linux-kernel, libc-alpha, linux-arch,
	Manfred Spraul, Michael Kerrisk, Arnd Bergmann

This is a follow-up to the series posted at [1]. To make review
a little easier, I'm focusing on just one class of system calls
here, and this is one that is handled differently from all the
others.

In particular, for sys_msgctl, sys_semctl and sys_shmctl, I do
not introduce a completely new set of replacement system calls,
but instead extend the existing ones to return data in the
reserved fields of the normal data structure.

This should be completely transparent to any existing user space,
and only after the 32-bit time_t wraps, it will make a difference
in the returned data.

libc implementations will consequently have to provide their own
data structures when they move to 64-bit time_t, and convert
the structures in user space from the ones returned by the kernel.

There are three cases here:

- little-endian architectures (except powerpc and mips) can use
  the normal layout and just cast the data structure to the
  user space type that contains 64-bit numbers.

- parisc and sparc can do the same thing with big-endian user
  space

- little-endian powerpc and most big-endian architectures have
  to flip the upper and lower 32-bit halves of the time_t value
  in memory, but can otherwise keep using the normal layout

- mips and big-endian xtensa need to be more careful because
  they are not consistent in their definitions, and they
  have to provide custom libc implementations for the system
  calls to use 64-bit time_t.

Please review.

	Arnd

[1] http://lwn.net/Articles/643407/

Arnd Bergmann (8):
  y2038: asm-generic: extend sysvipc data structures
  y2038: mips: extend sysvipc data structures
  y2038: x86: extend sysvipc data structures
  y2038: parisc: extend sysvipc data structures
  y2038: sparc: extend sysvipc data structures
  y2038: powerpc: extend sysvipc data structures
  y2038: xtensa: extend sysvipc data structures
  y2038: ipc: report long times to user space

 arch/arm64/include/asm/compat.h        | 32 +++++++++----------
 arch/mips/include/asm/compat.h         | 38 +++++++++++-----------
 arch/mips/include/uapi/asm/msgbuf.h    | 56 +++++++++++++++++++++-----------
 arch/mips/include/uapi/asm/sembuf.h    | 15 +++++++--
 arch/mips/include/uapi/asm/shmbuf.h    | 23 ++++++++++++--
 arch/parisc/include/asm/compat.h       | 32 +++++++++----------
 arch/parisc/include/uapi/asm/msgbuf.h  | 32 +++++++++----------
 arch/parisc/include/uapi/asm/sembuf.h  | 13 ++++----
 arch/parisc/include/uapi/asm/shmbuf.h  | 18 +++++------
 arch/powerpc/include/asm/compat.h      | 32 +++++++++----------
 arch/powerpc/include/uapi/asm/msgbuf.h | 18 +++++------
 arch/powerpc/include/uapi/asm/sembuf.h | 14 ++++----
 arch/powerpc/include/uapi/asm/shmbuf.h | 18 +++++------
 arch/sparc/include/asm/compat.h        | 32 +++++++++----------
 arch/sparc/include/uapi/asm/msgbuf.h   | 21 ++++++------
 arch/sparc/include/uapi/asm/sembuf.h   | 15 ++++-----
 arch/sparc/include/uapi/asm/shmbuf.h   | 20 ++++++------
 arch/tile/include/asm/compat.h         | 32 +++++++++----------
 arch/x86/include/asm/compat.h          | 32 +++++++++----------
 arch/x86/include/uapi/asm/msgbuf.h     | 41 +++++++++++++++++++++++-
 arch/x86/include/uapi/asm/sembuf.h     | 10 ++++++
 arch/x86/include/uapi/asm/shmbuf.h     | 58 +++++++++++++++++++++++++++++++++-
 arch/xtensa/include/uapi/asm/msgbuf.h  | 24 +++++++-------
 arch/xtensa/include/uapi/asm/sembuf.h  | 16 +++++-----
 arch/xtensa/include/uapi/asm/shmbuf.h  | 36 +++++----------------
 include/linux/msg.h                    |  7 ++--
 include/linux/sem.h                    |  3 +-
 include/linux/shm.h                    |  7 ++--
 include/uapi/asm-generic/msgbuf.h      | 16 +++++-----
 include/uapi/asm-generic/sembuf.h      | 26 +++++++++------
 include/uapi/asm-generic/shmbuf.h      | 16 +++++-----
 ipc/compat.c                           |  8 +++++
 ipc/msg.c                              | 23 ++++++++------
 ipc/sem.c                              | 32 +++++++++++--------
 ipc/shm.c                              | 21 +++++++-----
 35 files changed, 499 insertions(+), 338 deletions(-)

-- 
2.1.0.rc2

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-05-21 14:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 15:12 [PATCH 0/9] converting system calls to 64-bit time_t, part 2 Arnd Bergmann
2015-05-20 15:08 ` [PATCH 3/9] y2038: mips: extend sysvipc data structures Arnd Bergmann
2015-05-20 15:08 ` [PATCH 2/9] y2038: asm-generic: " Arnd Bergmann
2015-05-21 15:06   ` Geert Uytterhoeven
2015-05-21 16:04     ` Arnd Bergmann
2015-05-20 15:13 ` [PATCH 4/9] y2038: x86: " Arnd Bergmann
2015-05-20 15:21 ` [PATCH 6/9] y2038: sparc: " Arnd Bergmann
2015-05-20 15:30 ` [PATCH 8/9] y2038: xtensa: " Arnd Bergmann
2015-05-20 15:31 ` [PATCH 9/9] y2038: ipc: report long times to user space Arnd Bergmann
2015-05-20 15:42 ` [PATCH 1/9] y2038: remove unneeded ipc uapi header files Arnd Bergmann
2015-05-20 16:03   ` Arnd Bergmann
2015-05-20 15:58 ` [PATCH 7/9] y2038: powerpc: extend sysvipc data structures Arnd Bergmann
2015-05-20 15:58 ` [PATCH 5/9] y2038: parisc: " Arnd Bergmann

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).