330b961e66
Upstream commit: 4ed990e5b97a61f29f929bdeb36c5b2abb547a64 - Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h - Update kernel version to 5.14 in tst-mman-consts.py - Update syscall lists for Linux 5.14 - Use Linux 5.14 in build-many-glibcs.py - Fix failing nss/tst-nss-files-hosts-long with local resolver - iconvconfig: Fix behaviour with --prefix [BZ #28199] - nptl: Fix race between pthread_kill and thread exit (swbz#12889, #1994068) - nptl: pthread_kill, pthread_cancel should not fail after exit (swbz#19193, #1994068) - support: Add support_wait_for_thread_exit - MIPS: Setup errno for {f,l,}xstat - x86-64: Use testl to check __x86_string_control - elf: Fix missing colon in LD_SHOW_AUXV output (swbz#28253, #1995648) - librt: add test (swbz#28213, #1994264) - CVE-2021-38604: fix NULL pointer dereference in mq_notify (swbz#28213, #1994264) - Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182) - iconv_charmap: Close output file when done - copy_and_spawn_sgid: Avoid double calls to close() - gaiconf_init: Avoid double-free in label and precedence lists - gconv_parseconfdir: Fix memory leak - ldconfig: avoid leak on empty paths in config file
66 lines
2.6 KiB
Diff
66 lines
2.6 KiB
Diff
commit 31902ae639d6a50e768a85f1cd2a17e56b8463c2
|
|
Author: Florian Weimer <fweimer@redhat.com>
|
|
Date: Fri Aug 6 09:51:38 2021 +0200
|
|
|
|
Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182)
|
|
|
|
__REDIRECT and __THROW are not compatible with C++ due to the ordering of the
|
|
__asm__ alias and the throw specifier. __REDIRECT_NTH has to be used
|
|
instead.
|
|
|
|
Fixes commit 8a40aff86ba5f64a3a84883e539cb67b ("io: Add time64 alias
|
|
for fcntl"), commit 82c395d91ea4f69120d453aeec398e30 ("misc: Add
|
|
time64 alias for ioctl"), commit b39ffab860cd743a82c91946619f1b8158
|
|
("Linux: Add time64 alias for prctl").
|
|
|
|
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
(cherry picked from commit c87fcacc50505d550f1bb038382bcc7ea73a5926)
|
|
|
|
diff --git a/io/fcntl.h b/io/fcntl.h
|
|
index 8917a73b420b503d..1c96f98f4d75ce65 100644
|
|
--- a/io/fcntl.h
|
|
+++ b/io/fcntl.h
|
|
@@ -187,10 +187,10 @@ extern int fcntl64 (int __fd, int __cmd, ...);
|
|
# endif
|
|
#else /* __USE_TIME_BITS64 */
|
|
# ifdef __REDIRECT
|
|
-extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
|
|
- __fcntl_time64) __THROW;
|
|
-extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
|
|
- __fcntl_time64) __THROW;
|
|
+extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...),
|
|
+ __fcntl_time64);
|
|
+extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...),
|
|
+ __fcntl_time64);
|
|
# else
|
|
extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
|
|
# define fcntl64 __fcntl_time64
|
|
diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h
|
|
index 6884d9925f06125f..9945c1e9181eb313 100644
|
|
--- a/misc/sys/ioctl.h
|
|
+++ b/misc/sys/ioctl.h
|
|
@@ -42,8 +42,8 @@ __BEGIN_DECLS
|
|
extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
|
|
#else
|
|
# ifdef __REDIRECT
|
|
-extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
|
|
- __ioctl_time64) __THROW;
|
|
+extern int __REDIRECT_NTH (ioctl, (int __fd, unsigned long int __request, ...),
|
|
+ __ioctl_time64);
|
|
# else
|
|
extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
|
|
# define ioctl __ioctl_time64
|
|
diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h
|
|
index db88938b3a542b0b..f0e0d2f27f9b9ee9 100644
|
|
--- a/sysdeps/unix/sysv/linux/sys/prctl.h
|
|
+++ b/sysdeps/unix/sysv/linux/sys/prctl.h
|
|
@@ -42,7 +42,7 @@ __BEGIN_DECLS
|
|
extern int prctl (int __option, ...) __THROW;
|
|
#else
|
|
# ifdef __REDIRECT
|
|
-extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
|
|
+extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64);
|
|
# else
|
|
extern int __prctl_time64 (int __option,d ...) __THROW;
|
|
# define ioctl __prctl_time64
|