From nobody Wed Aug 28 19:31:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WvDzl5vmqz5Mbm3; Wed, 28 Aug 2024 19:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WvDzl3w1hz4tKj; Wed, 28 Aug 2024 19:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724873475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1/YwTAx+dy7zuySDqcRaNF/xVawkV8uGUp71FSQCm4=; b=jskaX4kqY3B7TUR+Gio20ddxIZDTaskicjr9ZuK9lUUkAgpYkXb11yWc31jbaZV9UNEoeJ 09HhnuAW8tEbzBFvwpE6SzCbtic1KdUBnkwaAcUemG43Wil8/lphLO7ICgyj3C2c18TpEr ThwkFiDokgGyQR1d2IMh5d5qi5DmQkWfxcNX6yaAWqnZbdky0qrjv+BM3RAFhhGT/mlAGd /b88hhd6ujEYjUJoe+lao5aU56OeBt04GoP4jzHGaLiNl/65MnJXh6wXCLOsamO5Slh8rl vvR6/8jDza5h6WTHvcbpvsXkEDnGkIIWvSK2eWbbx3oRkWmvYtnowidJBuF1rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724873475; a=rsa-sha256; cv=none; b=RuI7gvytMraQsPcE/K0gvj4yJzVnoH4qkd32gYS54Y5gQGiNVT8t3iG5/SGY//sg3hkZg3 AMT52bAB2u520uaWjIQeVxHL6hVvMMpHuc9iLXEpWe6Y3bSSwYQNy0ZrCXmKeIxjKygMEQ foMwNNi02T5M4Llqsfbckr4cXKaA4jdRyqKJ4tvILmayO0MSC3LbnDRPiP8O1FTtLAb0+u 4Fn3CWANvUegIe4SvfsbaMkqUVz22OY3bwDY5P6W8PSvyQxhgpW3WbAcCBCGXKHZN9GMs/ FmiTS9prdc6uXR803Q6mDpxJV0SswRM5V7GDWp2GyEVGpQM+KXP1LoG+U2W2JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724873475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1/YwTAx+dy7zuySDqcRaNF/xVawkV8uGUp71FSQCm4=; b=J6SgKTuvEMjJzYmo1tiFW6l/v/f8qiGNSjnFIYtkvZHeXsU7MTsMxdFLLypzPb04euG0J/ c6ixdSXhXKSIqsOdBSt955zS+x8xJjTov4BFfoFL6ybUyXaftmXhmWAOiSaeL1HaxAiaCL F1Tb0SnwMQfMcZaL6F1YSdQd6Td7+TN3YMWk/7VC9IAo8gELprEJAW7e9rlFbxROf2Xq2B KtEwDQNogIaoXJ6H+4SUkn/jB92VcWV8iA2EGyd0rruoRp+LZLa2AgP1+LyHnzV7O/M89a QMOUvlTXLEovtPJg6yhcDm3/eboSU9/3J0+5qoYVQXUqi6+BkpKmBjiWoyGXpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WvDzl3WHYzmK0; Wed, 28 Aug 2024 19:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47SJVFbf089368; Wed, 28 Aug 2024 19:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47SJVF6p089365; Wed, 28 Aug 2024 19:31:15 GMT (envelope-from git) Date: Wed, 28 Aug 2024 19:31:15 GMT Message-Id: <202408281931.47SJVF6p089365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cb91dc50950f - main - atomic: Fix the cast in the atomic_load_consume() interceptor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb91dc50950ffdfd49337e844e231b69b8b5c634 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cb91dc50950ffdfd49337e844e231b69b8b5c634 commit cb91dc50950ffdfd49337e844e231b69b8b5c634 Author: Mark Johnston AuthorDate: 2024-08-28 19:25:11 +0000 Commit: Mark Johnston CommitDate: 2024-08-28 19:31:03 +0000 atomic: Fix the cast in the atomic_load_consume() interceptor As in commit c7a7e997d25d0, we should permit loading from a pointer to uintptr_t. Note that the other atomic_*_ptr() interfaces currently require casting regardless, only those defined in atomic_common.h try to be generic. Reported by: jrtc27 MFC after: 1 week --- sys/sys/atomic_san.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index ef81b4b7c51e..e22324b87623 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -270,7 +270,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); __DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ - ((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x))) + ((__typeof(*x))atomic_load_acq_ptr((volatile uintptr_t *)(x))) #define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr) #define atomic_set_ptr ATOMIC_SAN(set_ptr) #define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr)