Skip to content

Commit d047e32

Browse files
mjeansonIngo Molnar
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 <[email protected]> Signed-off-by: Michael Jeanson <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Mathieu Desnoyers <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 34929a0 commit d047e32

File tree

1 file changed

+2
-2
lines changed
  • tools/testing/selftests/rseq

1 file changed

+2
-2
lines changed

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)