<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc, branch vdso</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/?h=vdso</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/?h=vdso'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-09-27T18:25:36Z</updated>
<entry>
<title>linux: Add support for getrandom vDSO</title>
<updated>2024-09-27T18:25:36Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2024-09-18T14:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=f766fb0a85fa06a9081e6b39c0834960202fde85'/>
<id>urn:sha1:f766fb0a85fa06a9081e6b39c0834960202fde85</id>
<content type='text'>
Linux 6.11 has getrandom() in vDSO. It operates on a thread-local opaque
state allocated with mmap using flags specified by the vDSO.

Multiple states are allocated at once, as many as fit into a page, and
these are held in an array of available states to be doled out to each
thread upon first use, and recycled when a thread terminates. As these
states run low, more are allocated.

To make this procedure async-signal-safe, a simple guard is used in the
LSB of the opaque state address, falling back to the syscall if there's
reentrancy contention.

Also, _Fork() is handled by blocking signals on opaque state allocation
(so _Fork() always sees a consistent state even if it interrupts a
getrandom() call) and by iterating over the thread stack cache on
reclaim_stack. Each opaque state will be in the free states list
(grnd_alloc.states) or allocated to a running thread.

The cancellation is handled by always using GRND_NONBLOCK flags while
calling the vDSO, and falling back to the cancellable syscall if the
kernel returns EAGAIN (would block). Since getrandom is not defined by
POSIX and cancellation is supported as an extension, the cancellation is
handled as 'may occur' instead of 'shall occur' [1], meaning that if
vDSO does not block (the expected behavior) getrandom will not act as a
cancellation entrypoint. It avoids a pthread_testcancel call on the fast
path (different than 'shall occur' functions, like sem_wait()).

It is currently enabled for x86_64, which is available in Linux 6.11,
and aarch64, powerpc32, powerpc64, loongarch64, and s390x, which are
available in Linux 6.12.

Link: https://pubs.opengroup.org/onlinepubs/9799919799/nframe.html [1]
Co-developed-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Tested-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt; # x86_64
Tested-by: Adhemerval Zanella &lt;adhemerval.zanella@linaro.org&gt; # x86_64, aarch64
Tested-by: Xi Ruoyao &lt;xry111@xry111.site&gt; # x86_64, aarch64, loongarch64
Tested-by: Stefan Liebler &lt;stli@linux.ibm.com&gt; # s390x
</content>
</entry>
<entry>
<title>elf: Fix tst-dlopen-tlsreinit1.out test dependency</title>
<updated>2024-09-09T19:10:23Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-09-09T19:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=e82a7cb1622bff08d8e3a144d7c5516a088f1cbc'/>
<id>urn:sha1:e82a7cb1622bff08d8e3a144d7c5516a088f1cbc</id>
<content type='text'>
Fixes commit 5097cd344fd243fb8deb6dec96e8073753f962f9
("elf: Avoid re-initializing already allocated TLS in dlopen
(bug 31717)").

Reported-by: Patsy Griffin &lt;patsy@redhat.com&gt;
Reviewed-by: Patsy Griffin &lt;patsy@redhat.com&gt;
</content>
</entry>
<entry>
<title>Add a new fwrite test for memory streams</title>
<updated>2024-09-09T18:58:07Z</updated>
<author>
<name>Tulio Magno Quites Machado Filho</name>
<email>tuliom@redhat.com</email>
</author>
<published>2024-08-29T17:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=dccc9a5161264d2f98411c24ae22495ca3a09b60'/>
<id>urn:sha1:dccc9a5161264d2f98411c24ae22495ca3a09b60</id>
<content type='text'>
Ensure that fwrite() behaves correctly when using memory streams.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Add a new fwrite test for read-only streams</title>
<updated>2024-09-09T17:32:20Z</updated>
<author>
<name>Tulio Magno Quites Machado Filho</name>
<email>tuliom@redhat.com</email>
</author>
<published>2024-09-05T18:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=5d4ab106d4cf7d6e410d6fc3d460b090c9108682'/>
<id>urn:sha1:5d4ab106d4cf7d6e410d6fc3d460b090c9108682</id>
<content type='text'>
Ensure that fwrite() behaves correctly even when the stream is
read-only.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>AArch64: Optimize memset</title>
<updated>2024-09-09T14:30:00Z</updated>
<author>
<name>Wilco Dijkstra</name>
<email>wilco.dijkstra@arm.com</email>
</author>
<published>2024-09-09T14:26:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=cec3aef32412779e207f825db0d057ebb4628ae8'/>
<id>urn:sha1:cec3aef32412779e207f825db0d057ebb4628ae8</id>
<content type='text'>
Improve small memsets by avoiding branches and use overlapping stores.
Use DC ZVA for copies over 128 bytes.  Remove unnecessary code for ZVA sizes
other than 64 and 128.  Performance of random memset benchmark improves by 24%
on Neoverse N1.

Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>hppa: Update libm-test-ulps</title>
<updated>2024-09-09T13:57:42Z</updated>
<author>
<name>John David Anglin</name>
<email>danglin@gcc.gnu.org</email>
</author>
<published>2024-09-09T13:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=3fc1d3bc336b2ae1236f7d81bed3a49200094afa'/>
<id>urn:sha1:3fc1d3bc336b2ae1236f7d81bed3a49200094afa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>aarch64: Avoid redundant MOVs in AdvSIMD F32 logs</title>
<updated>2024-09-09T12:03:49Z</updated>
<author>
<name>Joe Ramsay</name>
<email>Joe.Ramsay@arm.com</email>
</author>
<published>2024-09-09T12:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=8b09af572b208bfde4d31c6abbae047dcc217675'/>
<id>urn:sha1:8b09af572b208bfde4d31c6abbae047dcc217675</id>
<content type='text'>
Since the last operation is destructive, the first argument to the FMA
also has to be the first argument to the special-case in order to
avoid unnecessary MOVs. Reorder arguments and adjust special-case
bounds to facilitate this.

Reviewed-by: Wilco Dijkstra  &lt;Wilco.Dijkstra@arm.com&gt;
</content>
</entry>
<entry>
<title>io: Add FUSE-based test for fchmod</title>
<updated>2024-09-09T07:51:50Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-08-22T09:02:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=43669fcf7315f494bbbc2c040cedeb0fa8416a5f'/>
<id>urn:sha1:43669fcf7315f494bbbc2c040cedeb0fa8416a5f</id>
<content type='text'>
Test all mode arguments, and that extra bits are ignored
as required by POSIX.

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>io: Add tst-lstat-nofollow, tst-lstat-nofollow-time64</title>
<updated>2024-09-09T07:14:22Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-08-29T09:06:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=f4ae345810942db891bddf9b482c72b3a120c3b2'/>
<id>urn:sha1:f4ae345810942db891bddf9b482c72b3a120c3b2</id>
<content type='text'>
They verify that lstat, lstat64 do not follow symbolic links.

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>Document limitations on streams passed to freopen</title>
<updated>2024-09-06T20:38:23Z</updated>
<author>
<name>Joseph Myers</name>
<email>josmyers@redhat.com</email>
</author>
<published>2024-09-06T20:38:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a2509a8bc955988f01f389a1cf74db3a9da42409'/>
<id>urn:sha1:a2509a8bc955988f01f389a1cf74db3a9da42409</id>
<content type='text'>
As recently discussed, document that freopen does not work with
streams opened with functions such as popen, fmemopen, open_memstream
or fopencookie.  I've filed
&lt;https://austingroupbugs.net/view.php?id=1855&gt; to clarify this issue
in POSIX.

Tested with "make info" and "make html".
</content>
</entry>
</feed>
