From nobody Wed Aug 28 19:15:38 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 4WvDf02K6lz5MZcL for ; Wed, 28 Aug 2024 19:15:52 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WvDdz4xzjz4rmH for ; Wed, 28 Aug 2024 19:15:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42ab880b73eso64439435e9.0 for ; Wed, 28 Aug 2024 12:15:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724872550; x=1725477350; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bhL8HMcqBBOP5lcukNoi8NinRQMDW3+MOUL1ZxkhuWg=; b=jI6LbF1/uX6ZxQcYT/zhq0hrrp4MDEtQZgztn+keVy3J04INgLAYOkurQTVp49bAao l6rLSgcmRE0mwCnqPJqzB9gOZtUHwbX9uj3oXUTzxIxHcOP3dISzDNaSNkJjkcjrFUUT STE9VnH1YQ6U/BiwwRO8uTPy3UCkKcbtaAlWAEwo2bz2lXZVDASvb1sN7O27ciwZ1YxW 79uuTqXDNg+SvdgH4QSAcXT+XaIy5Dq5M9p6mfbVpCjX/xI59wpKdulp7lTGvU5lIFM4 yjLXEajSNbvqPGEuJqx3M3fCVvTKV0sm9YEnPMnOQdwFBSSFYF6hA4NUZu3bJTL1jzUk M1hw== X-Forwarded-Encrypted: i=1; AJvYcCVMpr0ezISCcUIdWK8N1TmkUP5h6sYoxZUF2aRvP2+2aVwfueIgBMl4w70t9WPDv4lc0uGSUFB+Zfy/i5FcmdpYnelO@freebsd.org X-Gm-Message-State: AOJu0YwGpCGks3vgpXkHcpif0F4MBOze+TSFEVf8Jb4/HEOZl3RDTri4 Zeau66Rs+MCno2VMUIcZ0e4tK1N4klSAG9jJIeYNEF8YH2VriR4eH8gMykBe2GQ= X-Google-Smtp-Source: AGHT+IERJKsPce3xQ4HYGwyIZof7o+TPOG4sTmsctinGFHt13h75/7vhDb0LowvB8NGZ2MDflYBt4w== X-Received: by 2002:a05:600c:3ca4:b0:426:5fbc:f319 with SMTP id 5b1f17b1804b1-42bb01f45b7mr4584995e9.33.1724872549693; Wed, 28 Aug 2024 12:15:49 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3749b2429absm455618f8f.65.2024.08.28.12.15.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Aug 2024 12:15:49 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: git: c7a7e997d25d - main - atomic: Avoid casting the return value of atomic_load_ptr to void HEAD branches config description git-daemon-export-ok gl-conf hooks info objects packed-refs refs From: Jessica Clarke In-Reply-To: <202408281855.47SItml1024354@gitrepo.freebsd.org> Date: Wed, 28 Aug 2024 20:15:38 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9559E6F1-0FB5-48E9-9827-50D6BD8E5446@freebsd.org> References: <202408281855.47SItml1024354@gitrepo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3776.700.51) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4WvDdz4xzjz4rmH On 28 Aug 2024, at 19:55, Mark Johnston wrote: >=20 > The branch main has been updated by markj: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc7a7e997d25d0b33769252d002b16839= c864c83d >=20 > commit c7a7e997d25d0b33769252d002b16839c864c83d > Author: Mark Johnston > AuthorDate: 2024-08-28 18:51:06 +0000 > Commit: Mark Johnston > CommitDate: 2024-08-28 18:55:39 +0000 >=20 > atomic: Avoid casting the return value of atomic_load_ptr to void * >=20 > Otherwise a cast is needed to load a uintptr_t value. >=20 > Fixes: e1f4d623779d ("rangelocks: remove unneeded cast of the = atomic_load_ptr() result") > MFC after: 1 week > --- > sys/sys/atomic_san.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h > index eb6913296a45..ef81b4b7c51e 100644 > --- a/sys/sys/atomic_san.h > +++ b/sys/sys/atomic_san.h > @@ -266,7 +266,8 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); > #define atomic_fcmpset_rel_ptr ATOMIC_SAN(fcmpset_rel_ptr) > #define atomic_fetchadd_ptr ATOMIC_SAN(fetchadd_ptr) > #define atomic_load_ptr(x) \ > - ((void *)ATOMIC_SAN(load_ptr)(__DECONST(volatile uintptr_t *, (x)))) > + ((__typeof(*x))ATOMIC_SAN(load_ptr)( \ > + __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))) This variant is similarly wrong. Jess