<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/sysdeps, branch vdso</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/sysdeps?h=vdso</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/sysdeps?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>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>LoongArch: Fix macro redefined warning in tls-desc.S</title>
<updated>2024-09-06T07:46:13Z</updated>
<author>
<name>mengqinggang</name>
<email>mengqinggang@loongson.cn</email>
</author>
<published>2024-09-02T01:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=6252c59f15b373b51e11b787b7b7f33974cd0a27'/>
<id>urn:sha1:6252c59f15b373b51e11b787b7b7f33974cd0a27</id>
<content type='text'>
Undef macro to avoid redefined warning.
</content>
</entry>
<entry>
<title>i386: Update ulps</title>
<updated>2024-09-05T20:25:55Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-09-05T20:25:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a8c433856fec5d822c3ea35fab6f25af8fee2383'/>
<id>urn:sha1:a8c433856fec5d822c3ea35fab6f25af8fee2383</id>
<content type='text'>
As seen on an AMD Ryzen 9 7950X CPU when building with GCC 14
with SSE2 math.
</content>
</entry>
<entry>
<title>powerpc64le: Build new strtod tests with long double ABI flags (bug 32145)</title>
<updated>2024-09-05T20:02:23Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-09-05T19:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=cc3e743fc09ee6fca45767629df9cbcbe1feba82'/>
<id>urn:sha1:cc3e743fc09ee6fca45767629df9cbcbe1feba82</id>
<content type='text'>
This fixes several test failures:

=====FAIL: stdlib/tst-strtod1i.out=====
Locale tests
all OK
Locale tests
all OK
Locale tests
strtold("1,5") returns -6,38643e+367 and not 1,5
strtold("1.5") returns 1,5 and not 1
strtold("1.500") returns 1 and not 1500
strtold("36.893.488.147.419.103.232") returns 1500 and not 3,68935e+19
Locale tests
all OK

=====FAIL: stdlib/tst-strtod3.out=====
0: got wrong results -2.5937e+4826, expected 0

=====FAIL: stdlib/tst-strtod4.out=====
0: got wrong results -6,38643e+367, expected 0
1: got wrong results 0, expected 1e+06
2: got wrong results 1e+06, expected 10

=====FAIL: stdlib/tst-strtod5i.out=====
0: got wrong results -6,38643e+367, expected 0
2: got wrong results 0, expected -0
4: got wrong results -0, expected 0
5: got wrong results 0, expected -0
6: got wrong results -0, expected 0
7: got wrong results 0, expected -0
8: got wrong results -0, expected 0
9: got wrong results 0, expected -0
10: got wrong results -0, expected 0
11: got wrong results 0, expected -0
12: got wrong results -0, expected 0
13: got wrong results 0, expected -0
14: got wrong results -0, expected 0
15: got wrong results 0, expected -0
16: got wrong results -0, expected 0
17: got wrong results 0, expected -0
18: got wrong results -0, expected 0
20: got wrong results 0, expected -0
22: got wrong results -0, expected 0
23: got wrong results 0, expected -0
24: got wrong results -0, expected 0
25: got wrong results 0, expected -0
26: got wrong results -0, expected 0
27: got wrong results 0, expected -0

Fixes commit 3fc063dee01da4f80920a14b7db637c8501d6fd4
("Make __strtod_internal tests type-generic").

Suggested-by: Joseph Myers &lt;josmyers@redhat.com&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Linux: readdir_r needs to report getdents failures (bug 32124)</title>
<updated>2024-09-05T10:05:32Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-08-30T19:52:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=61f2c2e1d1287a791c22d86c943b44bcf66bb8ad'/>
<id>urn:sha1:61f2c2e1d1287a791c22d86c943b44bcf66bb8ad</id>
<content type='text'>
Upon error, return the errno value set by the __getdents call
in __readdir_unlocked.  Previously, kernel-reported errors
were ignored.

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>i386: Update ulps</title>
<updated>2024-09-05T07:57:25Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-09-05T07:57:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=ed416ee402dd0d014ed55b76c3b50c4700d875e3'/>
<id>urn:sha1:ed416ee402dd0d014ed55b76c3b50c4700d875e3</id>
<content type='text'>
As seen on an unspecified Intel system with glibc compiled
with GCC 8.
</content>
</entry>
<entry>
<title>linux: mips: Fix syscall_cancell build for __mips_isa_rev &gt;= 6</title>
<updated>2024-09-02T15:30:45Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2024-08-29T19:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=1927f718fcc48bdaea03086bdc2adf11279d655b'/>
<id>urn:sha1:1927f718fcc48bdaea03086bdc2adf11279d655b</id>
<content type='text'>
Use beqzc instead of bnel.

Checked with a mipsisa64r6el-n64-linux-gnu build and some nptl
cancellation tests on qemu.
</content>
</entry>
</feed>
