<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/rseq/Makefile, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-08-16T16:27:25+00:00</updated>
<entry>
<title>selftests/rseq: Fix build with undefined __weak</title>
<updated>2023-08-16T16:27:25+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2023-08-04T19:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e146162dcf2e4d486df8d76f6587b8819cf538bc'/>
<id>urn:sha1:e146162dcf2e4d486df8d76f6587b8819cf538bc</id>
<content type='text'>
commit d5ad9aae13dcced333c1a7816ff0a4fbbb052466 upstream.

Commit 3bcbc20942db ("selftests/rseq: Play nice with binaries statically
linked against glibc 2.35+") which is now in Linus' tree introduced uses
of __weak but did nothing to ensure that a definition is provided for it
resulting in build failures for the rseq tests:

rseq.c:41:1: error: unknown type name '__weak'
__weak ptrdiff_t __rseq_offset;
^
rseq.c:41:17: error: expected ';' after top level declarator
__weak ptrdiff_t __rseq_offset;
                ^
                ;
rseq.c:42:1: error: unknown type name '__weak'
__weak unsigned int __rseq_size;
^
rseq.c:43:1: error: unknown type name '__weak'
__weak unsigned int __rseq_flags;

Fix this by using the definition from tools/include compiler.h.

Fixes: 3bcbc20942db ("selftests/rseq: Play nice with binaries statically linked against glibc 2.35+")
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Message-Id: &lt;20230804-kselftest-rseq-build-v1-1-015830b66aa9@kernel.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: rseq: Fix incorrect kernel headers search path</title>
<updated>2023-03-10T08:34:17+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2023-01-27T13:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33adb9b047bebe30796c643c5d344ed0a45cf98d'/>
<id>urn:sha1:33adb9b047bebe30796c643c5d344ed0a45cf98d</id>
<content type='text'>
commit 2279bfc03211045c8f43a76b01889a5ca86acd5a upstream.

Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 5.18+
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35</title>
<updated>2022-02-02T12:11:35+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2022-01-24T17:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=233e667e1ae3e348686bd9dd0172e62a09d852e1'/>
<id>urn:sha1:233e667e1ae3e348686bd9dd0172e62a09d852e1</id>
<content type='text'>
glibc-2.35 (upcoming release date 2022-02-01) exposes the rseq per-thread
data in the TCB, accessible at an offset from the thread pointer, rather
than through an actual Thread-Local Storage (TLS) variable, as the
Linux kernel selftests initially expected.

The __rseq_abi TLS and glibc-2.35's ABI for per-thread data cannot
actively coexist in a process, because the kernel supports only a single
rseq registration per thread.

Here is the scheme introduced to ensure selftests can work both with an
older glibc and with glibc-2.35+:

- librseq exposes its own "rseq_offset, rseq_size, rseq_flags" ABI.

- librseq queries for glibc rseq ABI (__rseq_offset, __rseq_size,
  __rseq_flags) using dlsym() in a librseq library constructor. If those
  are found, copy their values into rseq_offset, rseq_size, and
  rseq_flags.

- Else, if those glibc symbols are not found, handle rseq registration
  from librseq and use its own IE-model TLS to implement the rseq ABI
  per-thread storage.

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-8-mathieu.desnoyers@efficios.com
</content>
</entry>
<entry>
<title>selftests/rseq: Fix out-of-tree compilation</title>
<updated>2020-02-20T15:57:12+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-02-20T11:37:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef89d0545132d685f73da6f58b7e7fe002536f91'/>
<id>urn:sha1:ef89d0545132d685f73da6f58b7e7fe002536f91</id>
<content type='text'>
Currently if you build with O=... the rseq tests don't build:

  $ make O=$PWD/output -C tools/testing/selftests/ TARGETS=rseq
  make: Entering directory '/linux/tools/testing/selftests'
  ...
  make[1]: Entering directory '/linux/tools/testing/selftests/rseq'
  gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./  -shared -fPIC rseq.c -lpthread -o /linux/output/rseq/librseq.so
  gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./  basic_test.c -lpthread -lrseq -o /linux/output/rseq/basic_test
  /usr/bin/ld: cannot find -lrseq
  collect2: error: ld returned 1 exit status

This is because the library search path points to the source
directory, not the output.

We can fix it by changing the library search path to $(OUTPUT).

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: Install settings files to fix TIMEOUT failures</title>
<updated>2020-02-20T15:56:42+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-02-20T04:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9167c8078c3527de6da241c8a1a75a9224ed90a'/>
<id>urn:sha1:b9167c8078c3527de6da241c8a1a75a9224ed90a</id>
<content type='text'>
Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second
timeout per test") added a 45 second timeout for tests, and also added
a way for tests to customise the timeout via a settings file.

For example the ftrace tests take multiple minutes to run, so they
were given longer in commit b43e78f65b1d ("tracing/selftests: Turn off
timeout setting").

This works when the tests are run from the source tree. However if the
tests are installed with "make -C tools/testing/selftests install",
the settings files are not copied into the install directory. When the
tests are then run from the install directory the longer timeouts are
not applied and the tests timeout incorrectly.

So add the settings files to TEST_FILES of the appropriate Makefiles
to cause the settings files to be installed using the existing install
logic.

Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rseq/selftests: add -no-integrated-as for clang</title>
<updated>2019-05-07T21:33:17+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2019-04-29T15:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdeb89d84eb28241f5168cc13cc53a5c39f5d111'/>
<id>urn:sha1:fdeb89d84eb28241f5168cc13cc53a5c39f5d111</id>
<content type='text'>
Ongoing work for asm goto support from clang requires the
-no-integrated-as compiler flag.

This compiler flag is present in the toplevel kernel Makefile,
but is not replicated for selftests. Add it specifically for
the rseq selftest which requires asm goto.

Link: https://reviews.llvm.org/D56571
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
CC: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Joel Fernandes &lt;joelaf@google.com&gt;
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
CC: Dave Watson &lt;davejwatson@fb.com&gt;
CC: Will Deacon &lt;will.deacon@arm.com&gt;
CC: Shuah Khan &lt;shuah@kernel.org&gt;
CC: Andi Kleen &lt;andi@firstfloor.org&gt;
CC: linux-kselftest@vger.kernel.org
CC: "H . Peter Anvin" &lt;hpa@zytor.com&gt;
CC: Chris Lameter &lt;cl@linux.com&gt;
CC: Russell King &lt;linux@arm.linux.org.uk&gt;
CC: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
CC: "Paul E . McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
CC: Paul Turner &lt;pjt@google.com&gt;
CC: Boqun Feng &lt;boqun.feng@gmail.com&gt;
CC: Josh Triplett &lt;josh@joshtriplett.org&gt;
CC: Steven Rostedt &lt;rostedt@goodmis.org&gt;
CC: Ben Maurer &lt;bmaurer@fb.com&gt;
CC: linux-api@vger.kernel.org
CC: Andy Lutomirski &lt;luto@amacapital.net&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rseq/selftests: Provide Makefile, scripts, gitignore</title>
<updated>2018-06-06T09:58:35+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2018-06-02T12:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ccba8b64452b8dbf2c9670de026d00f519bb5da0'/>
<id>urn:sha1:ccba8b64452b8dbf2c9670de026d00f519bb5da0</id>
<content type='text'>
A run_param_test.sh script runs many variants of the parametrizable
tests.

Wire up the rseq Makefile, add directory entry into MAINTAINERS file.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Joel Fernandes &lt;joelaf@google.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Dave Watson &lt;davejwatson@fb.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: linux-kselftest@vger.kernel.org
Cc: "H . Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Chris Lameter &lt;cl@linux.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Andrew Hunter &lt;ahh@google.com&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: "Paul E . McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Paul Turner &lt;pjt@google.com&gt;
Cc: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Ben Maurer &lt;bmaurer@fb.com&gt;
Cc: linux-api@vger.kernel.org
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lkml.kernel.org/r/20180602124408.8430-17-mathieu.desnoyers@efficios.com

</content>
</entry>
</feed>
