about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/Makefile
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-09-27 16:07:08 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-12 10:30:10 -0300
commit21e0f45c7d73df6fe30c77ffcc9f81410e2ee369 (patch)
tree32f861c62693a518a37113b2023543705cdc029d /sysdeps/unix/sysv/linux/Makefile
parenta4cf12360fb7a8eae4fa4923763309b7f10797c3 (diff)
downloadglibc-21e0f45c7d73df6fe30c77ffcc9f81410e2ee369.tar.gz
glibc-21e0f45c7d73df6fe30c77ffcc9f81410e2ee369.tar.xz
glibc-21e0f45c7d73df6fe30c77ffcc9f81410e2ee369.zip
linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350)
The __convert_scm_timestamps() only updates the control message last
pointer for SOL_SOCKET type, so if the message control buffer contains
multiple ancillary message types the converted timestamp one might
overwrite a valid message.

The test check if the extra ancillary space is correctly handled
by recvmsg/recvmmsg, where if there is no extra space for the 64-bit
time_t converted message the control buffer should be marked with
MSG_TRUNC.  It also check if recvmsg/recvmmsg handle correctly multiple
ancillary data.

Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and
4.15 kernel.

Co-authored-by: Fabian Vogt <fvogt@suse.de>
Diffstat (limited to 'sysdeps/unix/sysv/linux/Makefile')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 61acc1987d..60aa9d89d6 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -275,6 +275,9 @@ sysdep_routines += cmsg_nxthdr
 CFLAGS-recvmmsg.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sendmmsg.c = -fexceptions -fasynchronous-unwind-tables
 
+tests += tst-socket-timestamp
+tests-time64 += tst-socket-timestamp-time64
+
 tests-special += $(objpfx)tst-socket-consts.out
 $(objpfx)tst-socket-consts.out: ../sysdeps/unix/sysv/linux/tst-socket-consts.py
 	PYTHONPATH=../scripts \