linux/tools/testing/selftests/rseq
Sean Christopherson 3bcbc20942 selftests/rseq: Play nice with binaries statically linked against glibc 2.35+
To allow running rseq and KVM's rseq selftests as statically linked
binaries, initialize the various "trampoline" pointers to point directly
at the expect glibc symbols, and skip the dlysm() lookups if the rseq
size is non-zero, i.e. the binary is statically linked *and* the libc
registered its own rseq.

Define weak versions of the symbols so as not to break linking against
libc versions that don't support rseq in any capacity.

The KVM selftests in particular are often statically linked so that they
can be run on targets with very limited runtime environments, i.e. test
machines.

Fixes: 233e667e1a ("selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35")
Cc: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230721223352.2333911-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-07-29 11:05:28 -04:00
..
.gitignore selftests/rseq: Implement parametrized mm_cid test 2022-12-27 12:52:15 +01:00
basic_percpu_ops_test.c selftests/rseq: Implement basic percpu ops mm_cid test 2022-12-27 12:52:15 +01:00
basic_test.c selftests/rseq: Implement rseq numa node id field selftest 2022-12-27 12:52:11 +01:00
compiler.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
Makefile linux-kselftest-next-6.3-rc1 2023-02-23 09:37:29 -08:00
param_test.c selftests/rseq: parametrized test: Report/abort on negative concurrency ID 2022-12-27 12:52:15 +01:00
rseq-abi.h selftests/rseq: Implement rseq mm_cid field support 2022-12-27 12:52:12 +01:00
rseq-arm64-bits.h selftests/rseq: arm64: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-arm64.h selftests/rseq: arm64: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-arm-bits.h selftests/rseq: arm: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-arm.h selftests/rseq: arm: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-bits-reset.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq-bits-template.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq-generic-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-mips-bits.h selftests/rseq: mips: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-mips.h selftests/rseq: mips: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-ppc-bits.h selftests/rseq: ppc: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-ppc-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-ppc.h selftests/rseq: ppc: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-riscv-bits.h selftests/rseq: riscv: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-riscv.h selftests/rseq: riscv: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-s390-bits.h selftests/rseq: s390: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-s390.h selftests/rseq: s390: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-x86-bits.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq-x86-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-x86.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq.c selftests/rseq: Play nice with binaries statically linked against glibc 2.35+ 2023-07-29 11:05:28 -04:00
rseq.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
run_param_test.sh selftests/rseq: Revert "selftests/rseq: Add mm_numa_cid to test script" 2023-01-12 11:22:22 +01:00
settings rseq/selftests: Turn off timeout setting 2019-12-23 10:52:41 -07:00