From nobody Wed Aug 28 19:31:47 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 4WvF0S4vZdz5Mc6x; Wed, 28 Aug 2024 19:31:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 4WvF0S38F9z4tSr; Wed, 28 Aug 2024 19:31:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-39d22965434so2955605ab.0; Wed, 28 Aug 2024 12:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724873510; x=1725478310; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=DRVfuPAtJTI3+7iyGAS+cdBRCnzRb50IpG5TWlfhVCg=; b=ApLXvx0Fa5ZypPlXEmgjl1j6wdNh99WUb7TTojHedLqM0NueIykyBv4xkcTvFZQVEb kpl+2huLVUKeYpcqbg5KZk59kYS+XWeRtRIhHdLzOs+ANX9qA8thLTblXzVj8jk5fmh1 y7vIeAmH1BDU5gooKo2jM3ZDRX5YZCV+TvP1i5HOI2aSEXcQLwsUaDMRV0sB/F7NZJkn DVyaiA5MgOtslpChl7fPEQ+1fEcKXqd24w4QZBtWJFbstG8a8i2SzfgQV7b3n910pjGT H0Ko0HjtAKcIs4/XR3W1bk8Z/tL2piocIwUzQEOdAmzWVWAahg+LSVS/ldGmfqVUNSXM q7fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724873510; x=1725478310; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DRVfuPAtJTI3+7iyGAS+cdBRCnzRb50IpG5TWlfhVCg=; b=X6q/SE/25xvAL79GoZW2f6iKoM31be8qcws4up4a+3bI7jzC5UTKFaZs7qKXFjh3EP DonaFlVD53EMFQAGmzcfW/NhBNMPftXyKnlldx9uT9CBsJ133o+LP6CdkTqig0HydE72 oKEleJ0K+9WE6HABvRF5xOvWK4K38fdzizFPVnLdqZXZpr05QdLLMCbgkIlWFfZfPn3y VNEu1VlsWVBTt9Aqxh3DNeQEF85BUtuaSA223jDF0OPu4W/rvkf9GiP1BadAO/CGYyOb q5OX8LDxeg/mxbfaZp84uYM7hRkdeiYwS2NRrHXs+3fAHrxEilidSCkTf3FnduvXGcrS v8ag== X-Forwarded-Encrypted: i=1; AJvYcCUN2lmaPIwlxvRPj4pHB7jyJxxI4O1OOFk/A3gAibxKIFmmoHWcJgjv1Bx4Yacnx5JQ9CP5RqjM4JbiGNiQv96bmNvn@freebsd.org, AJvYcCVddpBFtAfwBekzpV/NYvSF0ee89s1zdRGMPdRpay+Sa3CJzf2OjqIao8cNOz8L7Ew13qdAd7R+4rtL1jRkl3O7BFNpc4E=@freebsd.org X-Gm-Message-State: AOJu0YwzrUh9Sb1lADhi1Na2dM32diZzNfUjh0KxxP0ljsEajH6wT+mB F7A1EOn9R4V81uifWZ6fQ5friNCA+RPBHrJGbv7puXu1/iDfXAO3kq6UuQ== X-Google-Smtp-Source: AGHT+IG0HIe5/wbBbpyH5ygT/mno+Sze7E7rJ3NY7W1Wlgsc8ILQJcUNuTFjFJWrj4S4MSbOXAlOlQ== X-Received: by 2002:a05:6e02:1e0e:b0:39d:4dab:a533 with SMTP id e9e14a558f8ab-39f389db2b8mr2073455ab.0.1724873510371; Wed, 28 Aug 2024 12:31:50 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4ced0da0e38sm12068173.105.2024.08.28.12.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:31:49 -0700 (PDT) Date: Wed, 28 Aug 2024 15:31:47 -0400 From: Mark Johnston To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" 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 Message-ID: References: <202408281855.47SItml1024354@gitrepo.freebsd.org> <9559E6F1-0FB5-48E9-9827-50D6BD8E5446@freebsd.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9559E6F1-0FB5-48E9-9827-50D6BD8E5446@freebsd.org> 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:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WvF0S38F9z4tSr On Wed, Aug 28, 2024 at 08:15:38PM +0100, Jessica Clarke wrote: > On 28 Aug 2024, at 19:55, Mark Johnston wrote: > > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c7a7e997d25d0b33769252d002b16839c864c83d > > > > commit c7a7e997d25d0b33769252d002b16839c864c83d > > Author: Mark Johnston > > AuthorDate: 2024-08-28 18:51:06 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-08-28 18:55:39 +0000 > > > > atomic: Avoid casting the return value of atomic_load_ptr to void * > > > > Otherwise a cast is needed to load a uintptr_t value. > > > > 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(-) > > > > 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. Thank you, fixed in cb91dc50950f.