[tip: sched/core] rseq/selftests: Fix namespace collision with rseq UAPI header
From: tip-bot2 for Michael Jeanson
Date: Wed Mar 19 2025 - 16:38:32 EST
The following commit has been merged into the sched/core branch of tip:
Commit-ID: d047e32b8d1b29d178074b5f4312372e991d5da2
Gitweb: https://git.kernel.org/tip/d047e32b8d1b29d178074b5f4312372e991d5da2
Author: Michael Jeanson <mjeanson@xxxxxxxxxxxx>
AuthorDate: Wed, 19 Mar 2025 16:21:39 -04:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Wed, 19 Mar 2025 21:26:24 +01:00
rseq/selftests: Fix namespace collision with rseq UAPI header
When the rseq UAPI header is included, 'union rseq' clashes with 'struct
rseq'. It's not the case in the rseq selftests but it does break the KVM
selftests that also include this file.
Rename 'union rseq' to 'union rseq_tls' to fix this.
Fixes: e6644c967d3c ("rseq/selftests: Ensure the rseq ABI TLS is actually 1024 bytes")
Reported-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Michael Jeanson <mjeanson@xxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20250319202144.1141542-1-mjeanson@xxxxxxxxxxxx
---
tools/testing/selftests/rseq/rseq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c
index 6d8997d..663a9ce 100644
--- a/tools/testing/selftests/rseq/rseq.c
+++ b/tools/testing/selftests/rseq/rseq.c
@@ -75,13 +75,13 @@ static int rseq_ownership;
* Use a union to ensure we allocate a TLS area of 1024 bytes to accomodate an
* rseq registration that is larger than the current rseq ABI.
*/
-union rseq {
+union rseq_tls {
struct rseq_abi abi;
char dummy[RSEQ_THREAD_AREA_ALLOC_SIZE];
};
static
-__thread union rseq __rseq __attribute__((tls_model("initial-exec"))) = {
+__thread union rseq_tls __rseq __attribute__((tls_model("initial-exec"))) = {
.abi = {
.cpu_id = RSEQ_ABI_CPU_ID_UNINITIALIZED,
},