<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc.git/include/sys/socket.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/'/>
<entry>
<title>Fix all the remaining misspellings -- BZ 25337</title>
<updated>2023-06-02T01:39:48+00:00</updated>
<author>
<name>Paul Pluzhnikov</name>
<email>ppluzhnikov@google.com</email>
</author>
<published>2023-05-20T13:37:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=7f0d9e61f40c669fca3cfd1e342fa8236c7220b7'/>
<id>7f0d9e61f40c669fca3cfd1e342fa8236c7220b7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg</title>
<updated>2022-01-28T21:18:27+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2022-01-27T19:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=948ce73b31fdb0860bcec4b8e62b14e88234f98a'/>
<id>948ce73b31fdb0860bcec4b8e62b14e88234f98a</id>
<content type='text'>
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 &lt;fweimer@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;fweimer@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: Add hidden prototype for setsockopt</title>
<updated>2021-07-15T06:35:45+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2021-07-15T06:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=b8f889064d02cedc90a109848190207a767a4913'/>
<id>b8f889064d02cedc90a109848190207a767a4913</id>
<content type='text'>
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS}</title>
<updated>2021-06-15T13:42:06+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2020-09-07T20:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=13c51549e2077f2f3bf84e8fd0b46d8b0c615912'/>
<id>13c51549e2077f2f3bf84e8fd0b46d8b0c615912</id>
<content type='text'>
The recvmsg handling is more complicated because it requires check the
returned kernel control message and make some convertions.  For
!__ASSUME_TIME64_SYSCALLS it converts the first 32-bit time SO_TIMESTAMP
or SO_TIMESTAMPNS and appends it to the control buffer if has extra
space or returns MSG_CTRUNC otherwise.  The 32-bit time field is kept
as-is.

Calls with __TIMESIZE=32 will see the converted 64-bit time control
messages as spurious control message of unknown type.  Calls with
__TIMESIZE=64 running on pre-time64 kernels will see the original
message as a spurious control ones of unknown typ while running on
kernel with native 64-bit time support will only see the time64 version
of the control message.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The recvmsg handling is more complicated because it requires check the
returned kernel control message and make some convertions.  For
!__ASSUME_TIME64_SYSCALLS it converts the first 32-bit time SO_TIMESTAMP
or SO_TIMESTAMPNS and appends it to the control buffer if has extra
space or returns MSG_CTRUNC otherwise.  The 32-bit time field is kept
as-is.

Calls with __TIMESIZE=32 will see the converted 64-bit time control
messages as spurious control message of unknown type.  Calls with
__TIMESIZE=64 running on pre-time64 kernels will see the original
message as a spurious control ones of unknown typ while running on
kernel with native 64-bit time support will only see the time64 version
of the control message.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: Add time64 recvmmsg support</title>
<updated>2020-09-28T20:28:39+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2020-07-06T19:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=b16f282cb079980ddb4de5c9a2350e8b1919d023'/>
<id>b16f282cb079980ddb4de5c9a2350e8b1919d023</id>
<content type='text'>
The wire-up syscall __NR_recvmmsg_time64 (for 32-bit) or
__NR_recvmmsg (for 64-bit) is used as default.  The 32-bit fallback
is used iff __ASSUME_TIME64_SYSCALLS is not defined, which assumes the
kernel ABI provides either __NR_socketcall or __NR_recvmmsg
(32-bit time_t).

It does not handle the timestamps on ancillary data (SCM_TIMESTAMPING
records).

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The wire-up syscall __NR_recvmmsg_time64 (for 32-bit) or
__NR_recvmmsg (for 64-bit) is used as default.  The 32-bit fallback
is used iff __ASSUME_TIME64_SYSCALLS is not defined, which assumes the
kernel ABI provides either __NR_socketcall or __NR_recvmmsg
(32-bit time_t).

It does not handle the timestamps on ancillary data (SCM_TIMESTAMPING
records).

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use libc_hidden_* for __cmsg_nxthdr (bug 15105).</title>
<updated>2018-02-15T20:59:12+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2018-02-15T20:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=e4452a2d19279d4c90bcafe09ec3cbfd3efe9b6a'/>
<id>e4452a2d19279d4c90bcafe09ec3cbfd3efe9b6a</id>
<content type='text'>
Among other localplt test failures when building with -Os, there are
libc.so PLT references for __cmsg_nxthdr.  This is a simple case of a
function that is inlined for -O2 but not for -Os; this patch adds
libc_hidden_proto / libc_hidden_def for it to avoid a localplt failure
even when it is not inlined.

Tested for x86_64 (both that it removes this particular localplt
failure for -Os - but other such failures remain so the bug can't yet
be closed - and that the testsuite continues to pass without -Os).

	[BZ #15105]
	* include/sys/socket.h [!_ISOMAC] (__cmsg_nxthdr): Use
	libc_hidden_proto.
	* sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Use
	libc_hidden_def.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Among other localplt test failures when building with -Os, there are
libc.so PLT references for __cmsg_nxthdr.  This is a simple case of a
function that is inlined for -O2 but not for -Os; this patch adds
libc_hidden_proto / libc_hidden_def for it to avoid a localplt failure
even when it is not inlined.

Tested for x86_64 (both that it removes this particular localplt
failure for -Os - but other such failures remain so the bug can't yet
be closed - and that the testsuite continues to pass without -Os).

	[BZ #15105]
	* include/sys/socket.h [!_ISOMAC] (__cmsg_nxthdr): Use
	libc_hidden_proto.
	* sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Use
	libc_hidden_def.
</pre>
</div>
</content>
</entry>
<entry>
<title>__opensock: Remove internal_function attribute</title>
<updated>2017-08-17T08:18:15+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2017-08-17T08:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=038d1cafafb3094a9fbebd35f4aa8d0ebae0e55b'/>
<id>038d1cafafb3094a9fbebd35f4aa8d0ebae0e55b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Assume that SOCK_CLOEXEC is available and works</title>
<updated>2015-10-17T10:02:37+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2015-10-17T10:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=52fb79d6cdecb89a6f0375091e7c12ed79ae6760'/>
<id>52fb79d6cdecb89a6f0375091e7c12ed79ae6760</id>
<content type='text'>
This fixes (harmless) data races when accessing the various
__have_sock_cloexec variables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes (harmless) data races when accessing the various
__have_sock_cloexec variables.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix mq_notify socket, recv namespace (bug 18546).</title>
<updated>2015-06-17T20:20:08+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-06-17T20:20:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=0595c98494c25f8eaa1a3298e8fa032ad5e4405e'/>
<id>0595c98494c25f8eaa1a3298e8fa032ad5e4405e</id>
<content type='text'>
mq_notify (in the 1996 edition of POSIX) brings in references to recv
and socket (not in POSIX until the 2001 edition).  This patch fixes
this by using __recv and __socket, exporting them from libc at version
GLIBC_PRIVATE.

Tested for x86_64 and x86 (testsuite and comparison of installed
stripped shared libraries; PLT / dynamic symbol table changes render
the comparison not particularly useful for libc).

	[BZ #18546]
	* socket/recv.c (__recv): Use libc_hidden_def.
	* socket/socket.c (__socket): Likewise.
	* sysdeps/mach/hurd/recv.c (__recv): Likewise.
	* sysdeps/mach/hurd/socket.c (__socket): Likewise.
	* sysdeps/unix/sysv/linux/generic/recv.c (__recv): Likewise.
	* sysdeps/unix/sysv/linux/recv.c (__recv): Use libc_hidden_weak.
	* sysdeps/unix/sysv/linux/socket.c (__socket): Use
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/x86_64/recv.c (__recv): Use
	libc_hidden_weak.
	* include/sys/socket.h (__socket): Do not use attribute_hidden.
	Use libc_hidden_proto.
	(__recv): Likewise.
	* socket/Versions (libc): Export __recv and __socket at version
	GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/mq_notify.c (helper_thread): Call __recv
	instead of recv.
	(init_mq_netlink): Call __socket instead of socket.
	* conform/Makefile (test-xfail-POSIX/mqueue.h/linknamespace):
	Remove variable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mq_notify (in the 1996 edition of POSIX) brings in references to recv
and socket (not in POSIX until the 2001 edition).  This patch fixes
this by using __recv and __socket, exporting them from libc at version
GLIBC_PRIVATE.

Tested for x86_64 and x86 (testsuite and comparison of installed
stripped shared libraries; PLT / dynamic symbol table changes render
the comparison not particularly useful for libc).

	[BZ #18546]
	* socket/recv.c (__recv): Use libc_hidden_def.
	* socket/socket.c (__socket): Likewise.
	* sysdeps/mach/hurd/recv.c (__recv): Likewise.
	* sysdeps/mach/hurd/socket.c (__socket): Likewise.
	* sysdeps/unix/sysv/linux/generic/recv.c (__recv): Likewise.
	* sysdeps/unix/sysv/linux/recv.c (__recv): Use libc_hidden_weak.
	* sysdeps/unix/sysv/linux/socket.c (__socket): Use
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/x86_64/recv.c (__recv): Use
	libc_hidden_weak.
	* include/sys/socket.h (__socket): Do not use attribute_hidden.
	Use libc_hidden_proto.
	(__recv): Likewise.
	* socket/Versions (libc): Export __recv and __socket at version
	GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/mq_notify.c (helper_thread): Call __recv
	instead of recv.
	(init_mq_netlink): Call __socket instead of socket.
	* conform/Makefile (test-xfail-POSIX/mqueue.h/linknamespace):
	Remove variable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix __sendmmsg prototype guards</title>
<updated>2014-12-11T19:55:44+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>azanella@linux.vnet.ibm.com</email>
</author>
<published>2014-12-11T19:54:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=7f29694236aab000eae24f36b7989a6b774044ae'/>
<id>7f29694236aab000eae24f36b7989a6b774044ae</id>
<content type='text'>
Add __USE_GNU guards on 'socket/sys/socket.h' __sendmmsg prototype.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add __USE_GNU guards on 'socket/sys/socket.h' __sendmmsg prototype.
</pre>
</div>
</content>
</entry>
</feed>
