From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796072828; b=KupAYO8jPcMTP1e5t2Upo92biavmIgsWkcD6H2JOZdAPWn9g/6o+kwLuet8cVIwLLvj1 qv6oMyY+bGzrxqXestCzx6wGgW1i13uEcynLjg13Po304xbd3rjTIcuMJYSOY0cFbL0DF uahw3RcErTw5p2IuQJp1mwdM6lPipw3+3EPhPW3iWnL6gCzS3cACmtjrs0afO7u/n6Qsg Axlwba1eGIq6QvYvahE7IHyolB+vvDghfMtdryGNug4uHilJZ0X6m6AHbV9VB7cKrPwcj 1I1S12iTcrkV0UEvG6rgU/mUh9qNg5H5rZ2sPadxyJDoOP9+JGjrOOclkM0amyB4MAw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796072828; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:Sender:Reply-to: To:Subject:Cc:In-Reply-To:References:MIME-Version:Message-ID:Robot-ID: Robot-Unsubscribe:Precedence:Content-Type:Content-Transfer-Encoding; bh=16XVx+zKzsjqWLNXumxewJgfOIgWVBjw/qNZBOrdpxY=; b=PyhqmFC3qwqj4WytdbxCIDWwzf7gcbnYfC3NXrbeOxm3WmLwjbCXPgp1WImH1cK4UHp6 6m/QI970TDknc4bwZWNbF0dVUGVIGoWRpAoSyYkR3T5VQ6uVycW+utTWEVHSADlp371zz 6d6cU5TgSY2dX2+uLOPe5U+yW/8vzLICmTIP2aVU5Xf0YSNIpQB3HWoZIuQNdyBe9IgNF bHkWBe62MCSTSm5k+Sy0cpYpUwsvLQxx2ThT9PW6oBzuMPBMNurXDRwuxFXQ+4CyVBiE4 f42b0J++WyDB5orpBbxIQN4kJql7CBFYk1/TBMP/BejH2UcPJTZjMBJEcB+fCf8c+3A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=zJChGj09; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=ZFRG8Fng; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B519B606A331; Mon, 30 Nov 2026 21:07:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B519B606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=zJChGj09; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=ZFRG8Fng Date: Mon, 30 Nov 2026 21:07:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796072826; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=16XVx+zKzsjqWLNXumxewJgfOIgWVBjw/qNZBOrdpxY=; b=zJChGj09pPaGLijrhMx8sYu+6vm2VShHtQU29MgfAo1W7JmAPBfVioatgw0Ld1Dp9LzDjm 7/Nr+SXOmYaZXAOCKGwNR9r+2YQg6QQkv7zwTSRJRMqe8ORd9E74JkaEaCRJEjqjoge+Ww XkS0cOfURVJWYBxlihN3RVunHjP54KYLbDCp8Azce20/tENPmix6sZeEa1DjAKUQrBhkZ8 9JNkxPR4VdtK9lzSkHDzLibqzShbpSM7ne04ApuT6muPw76LakjFA9eNDybX2qy78Gjx11 GgLlYZt6y7zEPsHDj14tgnA1odF4Pe5IoE3cJ7ngm2U0RxNQzh3MLnzylGsmzg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796072826; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=16XVx+zKzsjqWLNXumxewJgfOIgWVBjw/qNZBOrdpxY=; b=ZFRG8FngWbsvzwL7odujoAr+o/UK7OOesHGzUTGxguYNy8nO5YOBknSkbP7h/xfN3VwQ8l Qy05Hbgj3Eph9zBQ== From: "tip-bot2 for Sasha Levin" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/futex] selftests/futex: Load atomic values before harness comparisons Cc: Sasha Levin , Thomas Gleixner , andrealmeid@igalia.com, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20261014200147.1364987-1-sashal@kernel.org> References: <20261014200147.1364987-1-sashal@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-ID: <179607282463.1190409.3869419949548927.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the locking/futex branch of tip: Commit-ID: 30d00ffecaa9624bc7f4f84f3e8ff810be83a0a0 Gitweb: https://git.kernel.org/tip/30d00ffecaa9624bc7f4f84f3e8ff810be8= 3a0a0 Author: Sasha Levin AuthorDate: Wed, 14 Oct 2026 16:01:47 -04:00 Committer: Thomas Gleixner CommitterDate: Mon, 30 Nov 2026 22:03:34 +01:00 selftests/futex: Load atomic values before harness comparisons Clang 21 rejects the harness comparison because typeof(*futex) preserves the atomic qualification. Load the value explicitly in the three affected assertions so the harness compares unsigned integers. Atomic access and its existing sequentially consistent ordering are preserved. The baseline produces three invalid-operands errors. The complete futex suite builds with Clang 21 and GCC 14 after the change. Fixes: 608323bf7bb8 ("selftests: futex: Add tests for robust release operatio= ns") Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Andr=C3=A9 Almeida Link: https://patch.msgid.link/20261014200147.1364987-1-sashal@kernel.org --- tools/testing/selftests/futex/functional/robust_list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/futex/functional/robust_list.c b/tools/t= esting/selftests/futex/functional/robust_list.c index 87217c5..895e6cf 100644 --- a/tools/testing/selftests/futex/functional/robust_list.c +++ b/tools/testing/selftests/futex/functional/robust_list.c @@ -669,7 +669,7 @@ TEST_F(vdso_unlock, test_robust_try_unlock_uncontended) ret =3D self->vdso(futex, tid, &head.list_op_pending); =20 ASSERT_EQ(ret, tid); - ASSERT_EQ(*futex, 0); + ASSERT_EQ(atomic_load(futex), 0); =20 /* Check only the lower 32 bits for the 32-bit entry point */ if (variant->is_32) { @@ -709,7 +709,7 @@ TEST_F(vdso_unlock, test_robust_try_unlock_contended) ret =3D self->vdso(futex, tid, &head.list_op_pending); =20 ASSERT_EQ(ret, tid | FUTEX_WAITERS); - ASSERT_EQ(*futex, tid | FUTEX_WAITERS); + ASSERT_EQ(atomic_load(futex), tid | FUTEX_WAITERS); ASSERT_EQ(head.list_op_pending, &lock.list); } =20 @@ -793,7 +793,7 @@ TEST_F(futex_op, test_futex_robust_unlock) &head.list_op_pending, variant->val3); =20 ASSERT_EQ(ret, 0); - ASSERT_EQ(*futex, 0); + ASSERT_EQ(atomic_load(futex), 0); =20 if (variant->op & FUTEX_ROBUST_LIST32) { exp =3D (uint64_t)(unsigned long)&lock.list;