glibc/sysdeps
Adhemerval Zanella 489d0b8b32 Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg
The timestamps created by __convert_scm_timestamps only make sense for
64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t
timestamps since SO_TIMESTAMP will be defined to old values (either by
glibc or kernel headers).

Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it
(which breaks some programs [1]).

This patch makes only 64 bit time_t recvmsg and recvmmsg to call
__convert_scm_timestamps.  Also, the assumption to called it is changed
from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt
might be called by libraries built without __TIME_BITS=64.  The
MSG_CTRUNC is only set for the 64 bit symbols, it should happen only
if 64 bit time_t programs run older kernels.

Checked on x86_64-linux-gnu and i686-linux-gnu.

[1] https://github.com/systemd/systemd/pull/20567

Reviewed-by: Florian Weimer <fweimer@redhat.com>

(cherry picked from commit 948ce73b31)
2022-02-01 15:52:41 -03:00
..
aarch64 AArch64: Check for SVE in ifuncs [BZ #28744] 2022-01-07 10:10:27 +01:00
alpha nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
arc ARC: elf: make type safe 2021-07-21 13:13:45 -07:00
arm nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
csky Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
generic ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] 2021-11-03 07:53:12 +01:00
gnu hurd: Fix glob lstat compatibility 2021-07-22 20:31:52 +02:00
hppa Update hppa libm-test-ulps 2021-12-17 23:51:39 +01:00
htl htl: Do not expose pthread hidden proto outside libpthread 2021-07-18 20:25:33 +00:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i386 i386: Regenerate ulps 2021-07-25 22:29:27 +02:00
ia64 nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
ieee754 Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
m68k m68: Fix build after 9acda61d94 2021-04-06 15:10:31 -03:00
mach Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) 2022-01-31 14:58:02 +01:00
microblaze Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
mips ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] 2021-11-03 07:53:12 +01:00
nios2 Update Nios II libm-test-ulps. 2021-04-01 19:41:40 +00:00
nptl nptl: Fix type of pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np (bug 28036) 2021-09-21 07:15:25 +02:00
posix getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) 2022-01-24 11:37:06 +05:30
powerpc powerpc: Fix unrecognized instruction errors with recent binutils 2022-01-18 23:05:42 +01:00
pthread pthread/tst-cancel28: Fix barrier re-init race condition 2021-12-14 10:07:27 +05:30
riscv riscv: align stack before calling _dl_init [BZ #28703] 2021-12-17 22:50:13 +01:00
s390 s390: Use long branches across object boundaries (jgh instead of jh) 2021-11-10 15:22:24 +01:00
sh nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
sparc Update sparc libm-test-ulps 2021-12-18 23:45:53 +01:00
unix Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg 2022-02-01 15:52:41 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86 x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398] 2022-02-01 05:44:27 -08:00
x86_64 x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755] 2022-01-26 14:04:01 -08:00