<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/tools/testing/selftests/rseq/rseq-x86-thread-pointer.h, branch davem/net</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/rseq/rseq-x86-thread-pointer.h?h=davem%2Fnet</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/rseq/rseq-x86-thread-pointer.h?h=davem%2Fnet'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-07-02T22:15:01Z</updated>
<entry>
<title>selftests/rseq: Replace glibc-specific __GNUC_PREREQ with portable check</title>
<updated>2026-07-02T22:15:01Z</updated>
<author>
<name>Hisam Mehboob</name>
<email>hisamshar@gmail.com</email>
</author>
<published>2026-06-18T19:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d7b2769f8dba3e5f40d2a8a11988812d51160b17'/>
<id>urn:sha1:d7b2769f8dba3e5f40d2a8a11988812d51160b17</id>
<content type='text'>
Building the rseq selftests against musl libc fails because musl's
&lt;features.h&gt; does not provide the glibc-specific __GNUC_PREREQ macro:

  error: missing binary operator before token '('

Replace __GNUC_PREREQ(11, 1) with an equivalent check using __GNUC__
and __GNUC_MINOR__ directly.  This pattern is portable across all C
library implementations and is already used elsewhere in the tools/
tree (e.g., tools/include/linux/string.h).

This also allows removing the #include &lt;features.h&gt;, which was only
needed for __GNUC_PREREQ.

Fixes: 886ddfba933f ("selftests/rseq: Introduce thread pointer getters")
Signed-off-by: Hisam Mehboob &lt;hisamshar@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260618193724.589113-2-hisamshar@gmail.com
</content>
</entry>
<entry>
<title>selftests/rseq: Introduce thread pointer getters</title>
<updated>2022-02-02T12:11:35Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2022-01-24T17:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=886ddfba933f5ce9d76c278165d834d114ba4ffc'/>
<id>urn:sha1:886ddfba933f5ce9d76c278165d834d114ba4ffc</id>
<content type='text'>
This is done in preparation for the selftest uplift to become compatible
with glibc-2.35.

glibc-2.35 exposes the rseq per-thread data in the TCB, accessible
at an offset from the thread pointer.

The toolchains do not implement accessing the thread pointer on all
architectures. Provide thread pointer getters for ppc and x86 which
lack (or lacked until recently) toolchain support.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20220124171253.22072-7-mathieu.desnoyers@efficios.com
</content>
</entry>
</feed>
