Commit d047e32b authored by Michael Jeanson's avatar Michael Jeanson Committed by Ingo Molnar
Browse files

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: e6644c96 ("rseq/selftests: Ensure the rseq ABI TLS is actually 1024 bytes")
Reported-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarMichael Jeanson <mjeanson@efficios.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/r/20250319202144.1141542-1-mjeanson@efficios.com
parent 34929a07
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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,
	},