glibc/include
Adhemerval Zanella ffd178c651 sysv: linux: Add 64-bit time_t variant for shmctl
To provide a y2038 safe interface a new symbol __shmctl64 is added
and __shmctl is change to call it instead (it adds some extra buffer
copying for the 32 bit time_t implementation).

Two new structures are added:

  1. kernel_shmid64_ds: used internally only on 32-bit architectures
     to issue the syscall.  A handful of architectures (hppa, i386,
     mips, powerpc32, and sparc32) require specific implementations
     due to their kernel ABI.

  2. shmid_ds64: this is only for __TIMESIZE != 64 to use along with
     the 64-bit shmctl.  It is different than the kernel struct because
     the exported 64-bit time_t might require different alignment
     depending on the architecture ABI.

So the resulting implementation does:

  1. For 64-bit architectures it assumes shmid_ds already contains
     64-bit time_t fields and will result in just the __shmctl symbol
     using the __shmctl64 code.  The shmid_ds argument is passed as-is
     to the syscall.

  2. For 32-bit architectures with default 64-bit time_t (newer ABIs
     such riscv32 or arc), it will also result in only one exported
     symbol but with the required high/low time handling.

  3. Finally for 32-bit architecture with both 32-bit and 64-bit time_t
     support we follow the already set way to provide one symbol with
     64-bit time_t support and implement the 32-bit time_t support
     using of the 64-bit one.

     The default 32-bit symbol will allocate and copy the shmid_ds
     over multiple buffers, but this should be deprecated in favor
     of the __shmctl64 anyway.

Checked on i686-linux-gnu and x86_64-linux-gnu.  I also did some sniff
tests on powerpc, powerpc64, mips, mips64, armhf, sparcv9, and
sparc64.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-07-09 12:05:47 -03:00
..
arpa
bits
gnu
net
netinet Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
programs
protocols
rpc Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
rpcsvc Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
sys sysv: linux: Add 64-bit time_t variant for shmctl 2020-07-09 12:05:47 -03:00
aio.h
aliases.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
alloc_buffer.h
alloca.h
allocate_once.h
ar.h
argp-fmtstream.h
argp.h
argz.h
array_length.h
assert.h
atomic.h
byteswap.h
complex.h
cpio.h
crypt.h
ctype.h
des.h
dirent.h
dlfcn.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
dso_handle.h
elf.h
endian.h
envz.h
err.h
errno.h
error.h
execinfo.h
fcntl.h
features.h
fenv.h
file_change_detection.h
float.h
fmtmsg.h
fnmatch.h
fpu_control.h
fstab.h
fts.h
ftw.h
gconv.h
getopt.h
getopt_int.h
glob.h
gmp.h
gnu-versions.h
grp-merge.h
grp.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
gshadow.h
iconv.h
ifaddrs.h
ifreq.h
ifunc-impl-list.h
inline-hashtab.h
intprops.h
inttypes.h
langinfo.h
lastlog.h
libc-diag.h
libc-internal.h
libc-pointer-arith.h
libc-symbols.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
libgen.h
libintl.h
limits.h
link.h
list.h
list_t.h
locale.h
loop_unroll.h
malloc.h
math-narrow-eval.h
math.h
mcheck.h
memory.h
mntent.h
monetary.h
mqueue.h
netdb.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
netgroup.h
nl_types.h
nss.h
nsswitch.h
obstack.h
plural-exp.h
poll.h
printf.h
pthread.h
pty.h
pwd.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
random-bits.h y2038: Replace __clock_gettime with __clock_gettime64 2020-05-20 16:45:16 +02:00
re_comp.h
regex.h
regexp.h
resolv.h
rounding-mode.h
rtld-malloc.h
sched.h
scratch_buffer.h
search.h
set-hooks.h
setjmp.h
sgtty.h
shadow.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
shlib-compat.h
signal.h string: Add sigabbrev_np and sigdescr_np 2020-07-07 14:57:14 -03:00
spawn.h
stab.h
stackinfo.h
stap-probe.h
stdc-predef.h
stdint.h
stdio.h string: Add strerrorname_np and strerrordesc_np 2020-07-07 15:02:57 -03:00
stdio_ext.h
stdlib.h
string.h string: Add sigabbrev_np and sigdescr_np 2020-07-07 14:57:14 -03:00
strings.h
struct___timespec64.h
struct___timeval64.h
stubs-prologue.h
syscall.h
sysexits.h
syslog.h
tar.h
termios.h
tgmath.h
time.h
ttyent.h
uchar.h
ucontext.h
ulimit.h
unistd.h
utime.h
utmp.h
values.h
verify.h
wait.h
wchar.h
wctype.h
wordexp.h