glibc/conform/data
Adhemerval Zanella 78880cc185 Revert {send,sendm,recv,recvm}msg conformance changes
After some discussion in libc-alpha about this POSIX compliance fix, I see
that GLIBC should indeed revert back to previous definition of msghdr and
cmsghdr and implementation of sendmsg, recvmsg, sendmmsg, recvmmsg due some
reasons:

 * The possible issue where the syscalls wrapper add the compatibility
   layer is quite limited in scope and range.  And kernel current
   also add some limits to the values on the internal msghdr and
   cmsghdr fields:

     - msghdr::msg_iovlen larger than UIO_MAXIOV (1024) returns
       EMSGSIZE.
     - msghdr::msg_controllen larger than INT_MAX returns ENOBUFS.

 * There is a small performance hit for recvmsg/sendmsg/recmmsg which
   is neglectable, but it is a big hit for sendmmsg since now instead
   of calling the syscall for the packed structure, GLIBC is calling
   multiple sendmsg.  This defeat the very existence of the syscall.

 * It currently breaks libsanitizer build on GCC [1] (I fixed on compiler-rt).
   However the fix is incomplete because it does add any runtime check
   since libsanitizer currently does not have any facility to intercept
   symbols with multiple version [2].

   This, along with incorret dlsym/dlvsym return for versioned symbol due
   another bug [3], makes hard to interpose versioned symbols.

   Also, current approach of fixing GCC PR#71445 leads to half-baked
   solutions without versioned symbol interposing.

This patch basically reverts commits 2f0dc39029, 222c2d7f43,
af7f7c7ec8.  I decided to not revert abf29edd4a (Adjust
kernel-features.h defaults for recvmsg and sendmsg) mainly because it
does not really address the POSIX compliance original issue and also
adds some cleanups.

Tested on x86, i386, s390, s390x, aarch64, and powerpc64le.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71445
[2] https://github.com/google/sanitizers/issues/628
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=14932

	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Add xfail-.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	* nptl/Makefile (libpthread-routines): Remove ptw-oldrecvmsg and
	ptw-oldsendmsg.
	(CFLAGS-oldrecvmsg.c): Remove rule.
	(CFLAGS-oldsendmsg.c): Likewise.
	(CFLAGS-recvmsg.c): Add rule.
	(CFLAGS-sendmsg.c): Likewise.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
	oldrecvmsg, oldsendmsg, oldrecvmmsg, oldsendmmsg.
	(CFLAGS-recvmsg.c): Remove rule.
	(CFLAGS-sendmsg.c): Likewise.
	(CFLAGS-oldrecvmsg.c): Likewise.
	(CFLAGS-oldsendmsg.c): Likewise.
	(CFLAGS-recvmmsg.c): Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h (msghdr.msg_iovlen): Revert
	to kernel defined interfaces.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	(msghdr.__glibc_reserved1): Remove member.
	(msghdr.__glibc_reserved2): Likewise.
	(cmsghdr.__glibc_reserved1): Likewise.
	* sysdeps/unix/sysv/linux/oldrecvmmsg.c: Remove file.
	* sysdeps/unix/sysv/linux/oldrecvmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/oldsendmmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/oldsendmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/recvmmsg.c: Revert back to previous
	version.
	* sysdeps/unix/sysv/linux/recvmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/sendmmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/sendmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/Versions [libc] (GLIBC_2.24):
	Remove recvmsg and sendmsg.
	* sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/hppa/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/m68k/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/Versions
	[libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/nios2/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
	[libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/sparc/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions: Remove file
	* sysdeps/unix/sysv/linux/x86_64/64/Versions: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/Versions: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Remove new 2.24
	version for {recv,send,recm,sendm}msg.
	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
2016-06-10 11:58:16 -03:00
..
arpa conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
net conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
netinet conformtest: correct set of standards for which more headers are tested. 2014-03-06 17:43:46 +00:00
sys Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
aio.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
assert.h-data conformtest: Update expectations for some ISO C headers. 2012-05-01 20:05:49 +00:00
complex.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
cpio.h-data conformtest: Clean up expectations for POSIX for various headers. 2012-11-19 22:20:44 +00:00
ctype.h-data conformtest: Update expectations for some ISO C headers. 2012-05-01 20:05:49 +00:00
dirent.h-data First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
dlfcn.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
errno.h-data conformtest: Clean up expectations for POSIX for more headers. 2012-11-19 22:21:47 +00:00
fcntl.h-data conformtest: Do not expect S_IF* in fcntl.h. 2016-05-12 16:46:55 +00:00
fenv.h-data conformtest: Add test data for fenv.h. 2012-11-02 23:21:36 +00:00
float.h-data conformtest: Update expectations for some ISO C headers. 2012-05-01 20:05:49 +00:00
fmtmsg.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
fnmatch.h-data First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
ftw.h-data conformtest: Correct ftw.h expectations for XPG3, XPG4. 2016-05-20 19:45:06 +00:00
glob.h-data conformtest: Clean up expectations for POSIX for various headers. 2012-11-19 22:20:44 +00:00
grp.h-data Fix grp.h endgrent, getgrent namespace (bug 18528). 2015-06-12 22:29:19 +00:00
iconv.h-data First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
inttypes.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
iso646.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
langinfo.h-data conformtest: Add langinfo.h expectations for YESSTR, NOSTR. 2016-04-28 17:19:53 +00:00
libgen.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
limits.h-data conformtest: Correct some limits.h expectations for XPG3, XPG4. 2016-05-23 15:25:34 +00:00
locale.h-data conformtest: correct POSIX expectations for locale.h. 2015-05-20 22:56:27 +00:00
math.h-data Don't declare float / long double Bessel functions for XSI POSIX (bug 18977). 2015-09-16 22:04:40 +00:00
monetary.h-data First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
mqueue.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
ndbm.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
netdb.h-data Fix netdb.h addrinfo namespace (bug 18529). 2015-06-12 22:35:07 +00:00
nl_types.h-data First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
poll.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
pthread.h-data conformtest: Clean up expectations for POSIX for pthread.h. 2013-09-24 22:09:04 +00:00
pwd.h-data conformtest: Correct pwd.h expectations for XPG3. 2016-05-19 14:48:30 +00:00
regex.h-data conformtest: Clean up expectations for POSIX for various headers. 2012-11-19 22:20:44 +00:00
sched.h-data conformtest: Clean up expectations for POSIX for sched.h. 2013-09-25 00:51:42 +00:00
search.h-data conformtest: Correct search.h expectations for XPG3. 2016-05-19 14:35:41 +00:00
semaphore.h-data conformtest: clean up POSIX expectations for semaphore.h, signal.h, tar.h. 2014-03-07 03:21:04 +00:00
setjmp.h-data conformtest: Update expectations for more ISO C headers. 2012-05-09 10:05:14 +00:00
signal.h-data conformtest: Correct some signal.h expectations for XOPEN2K. 2016-04-27 14:03:14 +00:00
spawn.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
stdalign.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
stdarg.h-data conformtest: Correct XOPEN2K stdarg.h expectations. 2016-04-26 13:56:04 +00:00
stdbool.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
stddef.h-data conformtest: Update expectations for some ISO C headers. 2012-05-01 20:05:49 +00:00
stdint.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
stdio.h-data conformtest: Correct stdio.h expectations for fdopen. 2016-04-27 21:28:58 +00:00
stdlib.h-data conformtest: Correct some stdlib.h expectations for XPG3. 2016-05-13 17:26:04 +00:00
stdnoreturn.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
string.h-data conformtest: Do not expect strdup in string.h for XPG3. 2016-05-13 16:57:09 +00:00
strings.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
stropts.h-data conformtest: Support xfail markers on individual assertions. 2015-06-19 20:05:41 +00:00
syslog.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
tar.h-data conformtest: clean up POSIX expectations for semaphore.h, signal.h, tar.h. 2014-03-07 03:21:04 +00:00
termios.h-data Declare tcgetsid for XPG4 (bug 20055). 2016-05-11 18:05:37 +00:00
tgmath.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
time.h-data conformtest: Correct time.h XPG3 expectations. 2016-05-12 20:47:15 +00:00
uchar.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
ucontext.h-data conformtest: correct set of standards for which more headers are tested. 2014-03-06 17:43:46 +00:00
ulimit.h-data First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
unistd.h-data conformtest: Correct some unistd.h expectations for XPG3, XPG4. 2016-05-12 17:39:04 +00:00
utime.h-data Fix up POSIX testing in conformtest 2012-02-26 13:17:27 -05:00
utmpx.h-data conformtest: Support xfail markers on individual assertions. 2015-06-19 20:05:41 +00:00
varargs.h-data conformtest: correct set of standards for which some headers are tested. 2014-03-06 17:42:03 +00:00
wchar.h-data conformtest: Fix miscellaneous UNIX98 expectations. 2012-11-10 01:13:39 +00:00
wctype.h-data conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
wordexp.h-data conformtest: Clean up expectations for POSIX for various headers. 2012-11-19 22:20:44 +00:00