glibc/sysdeps
Adhemerval Zanella 3283f71113 sysv: linux: Add 64-bit time_t variant for msgctl
To provide a y2038 safe interface a new symbol __msgctl64 is added
and __msgctl is change to call it instead (it adds some extra buffer
coping for the 32 bit time_t implementation).

Two new structures are added:

  1. kernel_msqid64_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. msqid_ds64: this is only for __TIMESIZE != 64 to use along with
     the 64-bit msgctl.  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 msqid_ds already contains
     64-bit time_t fields and will result in just the __msgctl symbol
     using the __msgctl64 code.  The msgid_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
     the 64-bit time_t.

     The default 32-bit symbol will allocate and copy the msqid_ds
     over multiple buffers, but this should be deprecated in favor
     of the __msgctl64 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.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Alistair Francis <alistair.francis@wdc.com>
2020-07-09 12:05:40 -03:00
..
aarch64 aarch64: redefine RETURN_ADDRESS to strip PAC 2020-07-08 15:02:38 +01:00
alpha alpha: Use builtin sqrt{f} 2020-06-22 11:09:49 -03:00
arm Rewrite abi-note.S in C. 2020-07-08 15:02:37 +01:00
csky semaphore: consolidate arch headers into a generic one 2020-05-06 13:07:12 -07:00
generic rtld: Avoid using up static TLS surplus for optimizations [BZ #25051] 2020-07-08 17:32:56 +01:00
gnu signal: Move sys_errlist to a compat symbol 2020-07-07 14:10:58 -03:00
hppa dl-runtime: reloc_{offset,index} now functions arch overide'able 2020-06-05 13:45:46 -07:00
htl htl: Move cleanup handling to non-private libc-lock 2020-06-28 00:13:57 +00:00
hurd hurd: Evaluate fd before entering the critical section 2020-07-07 22:10:24 +02:00
i386 i386: Use builtin sqrtl 2020-06-22 11:09:49 -03:00
ia64 ia64: Use generic exp10f 2020-06-19 12:08:52 -03:00
ieee754 Use C2x return value from getpayload of non-NaN (bug 26073). 2020-07-06 16:18:02 +00:00
m68k m68k: Use sqrt{f} builtin for coldfire 2020-06-22 11:09:50 -03:00
mach Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
microblaze semaphore: consolidate arch headers into a generic one 2020-05-06 13:07:12 -07:00
mips mips: Use sqrt{f} builtin 2020-06-22 11:09:49 -03:00
nios2 semaphore: consolidate arch headers into a generic one 2020-05-06 13:07:12 -07:00
nptl nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np 2020-06-02 11:59:18 +02:00
posix hurd: Fix __writev_nocancel_nostatus 2020-06-14 17:45:04 +00:00
powerpc powerpc: Add support for POWER10 2020-06-29 10:08:38 -03:00
pthread htl: Enable cancel*16 an cancel*20 tests 2020-06-29 00:16:33 +00:00
riscv riscv: Use sqrt{f} builtin 2020-06-22 11:09:50 -03:00
s390 S390: Optimize __memset_z196. 2020-06-26 09:45:11 +02:00
sh semaphore: consolidate arch headers into a generic one 2020-05-06 13:07:12 -07:00
sparc sparc: Use sqrt{f} builtin 2020-06-22 11:09:49 -03:00
unix sysv: linux: Add 64-bit time_t variant for msgctl 2020-07-09 12:05:40 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
x86 rtld: Clean up PT_NOTE and add PT_GNU_PROPERTY handling 2020-07-08 14:28:53 +01:00
x86_64 x86: Add thresholds for "rep movsb/stosb" to tunables 2020-07-06 11:48:42 -07:00