This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/16919] recvmsg standard compliance


https://sourceware.org/bugzilla/show_bug.cgi?id=16919

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #10 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
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 2f0dc39029ae08, 222c2d7f4357d66,
af7f7c7ec8dea1.  I decided to not revert abf29edd4a3918 (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.

This is not a state to mark this bug a WONTFIX.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]