glibc/include/sys
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
..
auxv.h misc: Add internal __getauxval2 function 2020-10-27 16:34:37 +01:00
bitypes.h
cdefs.h Rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 2020-04-30 08:52:08 -05:00
dir.h
epoll.h
errno.h
fcntl.h
file.h
gmon_out.h
gmon.h
ioctl.h
ipc.h
mman.h
msg.h sysv: linux: Add 64-bit time_t variant for msgctl 2020-07-09 12:05:40 -03:00
param.h
poll.h y2038: linux: Provide __ppoll64 implementation 2019-11-11 14:41:43 +01:00
prctl.h Add a C wrapper for prctl [BZ #25896] 2020-04-30 10:42:43 -07:00
profil.h
queue.h
random.h hurd: Fix local PLT 2019-12-13 11:11:54 +01:00
resource.h setrlimit/getrlimit: Use __nonnull to avoid null pointer 2021-02-10 08:36:17 -03:00
select.h linux: Only use 64-bit syscall if required for select 2021-06-22 12:09:52 -03:00
sem.h sysv: linux: Add 64-bit time_t variant for semctl 2020-07-09 12:05:35 -03:00
sendfile.h hurd: avoid PLT ref between sendfile and sendfile64 2018-06-16 00:44:57 +02:00
shm.h sysv: linux: Add 64-bit time_t variant for shmctl 2020-07-09 12:05:47 -03:00
signal.h
single_threaded.h Add the __libc_single_threaded variable 2020-07-06 11:15:58 +02:00
socket.h Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg 2022-02-01 15:52:41 -03:00
stat.h time: Add 64-bit time support for getdate 2021-06-15 10:42:11 -03:00
statfs.h linux: Consolidate fstatfs implementations 2021-02-11 07:58:31 -03:00
statvfs.h linux: Consolidate statvfs implementations 2021-02-11 08:00:41 -03:00
sysinfo.h misc: Add __get_nprocs_sched 2021-10-01 18:19:09 +02:00
syslog.h ldbl-128ibm-compat: PLT redirects for using ldbl redirects internally 2020-03-25 14:34:23 -05:00
sysmacros.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
termios.h
time.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
timeb.h time: Add 64-bit time_t support for ftime 2020-10-27 09:54:50 -03:00
times.h
ttychars.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
types.h
uio.h
un.h socket: Add the __sockaddr_un_set function 2022-01-17 11:44:41 +01:00
unistd.h
utsname.h hurd: keep only required PLTs in ld.so 2020-11-11 02:36:22 +01:00
vfs.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
vlimit.h
wait.h Implement waitpid in terms of wait4 2019-12-19 16:11:09 -03:00
xattr.h