From nobody Wed Aug 28 19:15:38 2024 X-Original-To: dev-commits-src-main@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 4WvDdz6RQjz5MZTJ for ; Wed, 28 Aug 2024 19:15:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 4WvDdz51Ccz4rmJ 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-f47.google.com with SMTP id 5b1f17b1804b1-42816ca797fso64348855e9.2 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=DOABGI9kpL7EFam2ATMkx+IO45LvbTeI3+hi7urYPX1YkIrGYRPWLMQZYAZyUTJTOh yyPaRTTg35NBaPbqN8XjH+/5bDywW2vNBL6jhNF26ZyqCBCuuFSBTBd788cIOvcqEDCG t5jD0IEfZah3OvkgWy6f8W+ceWioTeFu9NJ9iHOcukWDFqPTXUAUVesSaKSNr7kKJJWp 8rI0MLCcCDIxii0XrL/TIHsXcMHVoayRTHyA0dvYmI8Pd28ZvVvPTqHhx69XMBmh46ms Hn0+DJmMQaZAlS16h09C1PBspa2WIeir5OOF9Zph42OFj6ckjQbHdWPTOWlgl1UDNCHv k2kw== X-Forwarded-Encrypted: i=1; AJvYcCUDsf2fOjZE155a+ClCReHQzmPxNo+uBQO2zlCevwMa+cXqNzwetI5wYRLSmEeDWG5YW+5h5B95VrVxdXcO7lfG0t8GCg==@freebsd.org X-Gm-Message-State: AOJu0Ywrc+JJqQarn0MRgvlqm3c8TMkSw/QDLEE2A9Q431Yqn/9leJOr r4G80yLJr81CgtditI0w+0AaqQamUuMFU78LyI4CG7ItEsklGcE83Vgt8Bu2i2K0KXSRY580PEE A 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 4WvDdz51Ccz4rmJ 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