glibc/include
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
..
arpa resolv: Move ns_samename into its own file, and into libc 2021-07-19 07:56:21 +02:00
bits Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
gnu
net
netinet
programs xmalloc: Fix warnings with gcc analyzer 2021-07-28 17:45:14 +05:30
protocols
rpc
rpcsvc
sys Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg 2022-02-01 15:52:41 -03:00
aio.h Linux: Move aio_suspend, aio_suspend64, __aio_suspend_time64 to libc 2021-06-25 11:55:27 +02:00
aliases.h
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
clone_internal.h Add an internal wrapper for clone, clone2 and clone3 2021-07-14 06:33:58 -07:00
complex.h
cpio.h
crypt.h
ctype.h
des.h
dirent.h Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
dlfcn.h elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols 2021-07-07 08:41:24 +02:00
dso_handle.h
elf.h
endian.h
envz.h
err.h
errno.h
error.h
execinfo.h
fcntl.h
features-time64.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
features.h Prepare for glibc 2.34 release. 2021-08-01 21:24:04 -04:00
fenv.h
file_change_detection.h Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
filename.h
float.h
fmtmsg.h
fnmatch.h
fpu_control.h
fstab.h
fts.h io: Add fts64 with 64-bit time_t support 2021-06-15 10:42:11 -03:00
ftw.h io: Add ftw64 with 64-bit time_t support 2021-06-15 10:42:11 -03:00
gconv.h
getopt_int.h
getopt.h
glob.h Fix extra PLT reference in libc.so due to __glob64_time64 if build with gcc 7.5 on 32bit. 2021-07-01 16:46:59 +02:00
gmp.h
gnu-versions.h
grp-merge.h
grp.h
gshadow.h
iconv.h
idx.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 nptl: Move pthread_create, thrd_create into libc 2021-05-21 22:35:00 +02:00
libc-pointer-arith.h Add cast_to_pointer to cast an integer to void * pointer 2021-05-22 05:09:15 -07:00
libc-symbols.h nss_files: Move into libc 2021-07-07 18:33:52 +02:00
libgen.h
libintl.h
limits.h
link.h ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340] 2021-11-03 07:50:30 +01:00
list_t.h
list.h
locale.h
loop_unroll.h
malloc.h Simplify __malloc_initialized 2021-07-22 18:38:04 +05:30
math-narrow-eval.h
math.h math: redirect roundeven function 2021-06-27 07:56:57 -07:00
mcheck.h mcheck: Wean away from malloc hooks [BZ #23489] 2021-07-22 18:38:02 +05:30
memory.h
mntent.h
monetary.h
mqueue.h Linux: Move mq_send, mq_timedsend, __mq_timedsend_time64 to libc 2021-06-25 12:21:12 +02:00
netdb.h nss_files: Move into libc 2021-07-07 18:33:52 +02:00
netgroup.h
nl_types.h
nss_dns.h nss: Directly load nss_dns, without going through dlsym/dlopen 2021-07-19 07:56:57 +02:00
nss_files.h nss: Access nss_files through direct references 2021-07-07 18:33:52 +02:00
nss.h
nsswitch.h
obstack.h
plural-exp.h
poll.h
printf.h
pthread.h Linux: Move mq_notify from librt to libc 2021-06-25 12:20:47 +02:00
pty.h login: Move libutil into libc 2021-06-30 08:43:37 +02:00
pwd.h
random-bits.h
re_comp.h
regex.h
regexp.h
register-atfork.h posix: Consolidate register-atfork 2021-03-12 10:19:22 -03:00
resolv.h resolv: Move res_queriesmatch to its own file and into libc 2021-07-19 07:56:21 +02:00
rounding-mode.h
rtld-malloc.h
sched.h
scratch_buffer.h
search.h
set-hooks.h
setjmp.h nptl: Move __pthread_unwind_next into libc 2021-04-21 19:49:50 +02:00
sgtty.h
shadow.h
shlib-compat.h Force building with -fno-common 2021-07-09 20:09:14 +02:00
shm-directory.h nptl: Move sem_close, sem_open into libc 2021-05-05 17:19:38 +02:00
signal.h
spawn.h
stab.h
stackinfo.h
stap-probe.h
stdc-predef.h
stdint.h
stdio_ext.h
stdio.h libio: Replace internal _IO_getdelim symbol with __getdelim 2021-07-07 18:33:52 +02:00
stdlib.h Remove __morecore and __default_morecore 2021-07-22 18:37:57 +05:30
string.h
strings.h
struct___timeb64.h
struct___timespec64.h
struct___timeval64.h
stubs-prologue.h
syscall.h
sysexits.h
syslog.h
tar.h
termios.h
tgmath.h
time.h Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
ttyent.h
uchar.h
ucontext.h
ulimit.h
unistd.h posix: Add posix_spawn_file_actions_addclosefrom_np 2021-07-08 14:08:15 -03:00
utime.h
utmp.h login: Move libutil into libc 2021-06-30 08:43:37 +02:00
values.h
verify.h
wait.h
wchar.h
wctype.h
wordexp.h