From nobody Thu Sep 05 13:46: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 4X00y00FVVz5W4rj; Thu, 05 Sep 2024 13:46:16 +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 4X00xz6lj0z4R1x; Thu, 5 Sep 2024 13:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725543975; 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=sIxx/FS5bJvca0vo3RvWHGmxYmMScEN77eS9Hoe7k8Q=; b=lpBSIG3MJXQjcOeTq8fTQm80JaRYAt4wHu+NHZnOarwan0T47SZxBvrixWXtjPWNWsaGIq FaHKc675Y4Un2XMesLEXLW7Ul0UaPYVZT+ZhP1/MqESmo4wZ8/fRdC1RWsDrCaRUu71uaR C8bkQ5Ztkk2VEzD7L1kIh6z2E9a3mWo0gFYv2f7X6ZHHDU9XFMSlN6WJvKzcZtBaSE5UVh DbKkC+NlWr1OrA7vFkmjsSR24XM/06Vg/yRcp3VluuRB3I+ExkLfWCjMIl92OwNWcNqp9D vhFWiLgLwCIvHM6CrOTrMRZM0YjxeyUMxEK7xc40lvqdoK3bfYvNXLsWrYXZSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725543975; a=rsa-sha256; cv=none; b=dSK4Dw7FIqrl8hYqmfscbJ9b0s8AHaQvn7qQuR/tMX+00z7NZAXpeX/j6UhBn8rZp1RI7n 79g8zHsimoKjxNY8uzY2BblbVzVGMLsMR3RvANDpsMWxOjabycpjajnRmJuyrw5SW192gy dkwG+xnDVKGJAMzJHwN4erVrMfAbe+XNzlk7J+8MTCi5JMtJ5bFh46+lm2Uv+G6UaG6y8s hcO4PF7nHGMD22zau9zCms9rlbxEuBwQ0kgG6Quq1Lhrx1GlZslpmdG47BZ3c5KPURvLod wyMuWY2x0PMTFTjTwHjdwElfrpdJhSRevrJ89G+jSjYZe1yEfK5MUFJu4AEt+g== 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=1725543975; 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=sIxx/FS5bJvca0vo3RvWHGmxYmMScEN77eS9Hoe7k8Q=; b=jbABcuizHsYEp2AOTXFCgpgxR3ZB7bzQ03sQWgp9VU5e3R27vevxsR1MutJodmqCtmvoQ8 T4rTSVx+YabUOfg8CElYnSWj2EltpnJCbCd3G2Psk7DJUT7678Kzu/bhwLL/npAMUR/IIg ejwl2lGBuX9Lm8hUTzoQNUHuXx3+c2sebCJg7wG+OwsilNZ+X6U8bNO2IuKItO4FMkDo8B Bz4DQ9qG9FwOg4iJRgVGB5xC28DONScv+HBGXn89182IVNsil/bhZhZ1t+VPLy03soA2pT Fqcl5u3dlA0GiKiQlQMwYW56qBo8nNTRyOzbuoU/lEJrJMJhXYQ4ou3AO1or4g== 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 4X00xz6Ldcz18vj; Thu, 5 Sep 2024 13:46: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 485DkFx5065195; Thu, 5 Sep 2024 13:46:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 485DkFdc065192; Thu, 5 Sep 2024 13:46:15 GMT (envelope-from git) Date: Thu, 5 Sep 2024 13:46:15 GMT Message-Id: <202409051346.485DkFdc065192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f3e22a08ca69 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: f3e22a08ca690bf3a80688641b9705aa2e1cb15c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f3e22a08ca690bf3a80688641b9705aa2e1cb15c commit f3e22a08ca690bf3a80688641b9705aa2e1cb15c Author: Mark Johnston AuthorDate: 2024-08-28 19:25:11 +0000 Commit: Mark Johnston CommitDate: 2024-09-05 13:44:00 +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 (cherry picked from commit cb91dc50950ffdfd49337e844e231b69b8b5c634) --- 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)