Skip to content

Commit d047e32

Browse files
mjeansoningomolnar
authored andcommitted
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: e6644c9 ("rseq/selftests: Ensure the rseq ABI TLS is actually 1024 bytes") Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/r/20250319202144.1141542-1-mjeanson@efficios.com
1 parent 34929a0 commit d047e32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • tools/testing/selftests/rseq

tools/testing/selftests/rseq/rseq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ static int rseq_ownership;
7575
* Use a union to ensure we allocate a TLS area of 1024 bytes to accomodate an
7676
* rseq registration that is larger than the current rseq ABI.
7777
*/
78-
union rseq {
78+
union rseq_tls {
7979
struct rseq_abi abi;
8080
char dummy[RSEQ_THREAD_AREA_ALLOC_SIZE];
8181
};
8282

8383
static
84-
__thread union rseq __rseq __attribute__((tls_model("initial-exec"))) = {
84+
__thread union rseq_tls __rseq __attribute__((tls_model("initial-exec"))) = {
8585
.abi = {
8686
.cpu_id = RSEQ_ABI_CPU_ID_UNINITIALIZED,
8787
},

0 commit comments

Comments
 (0)