From patchwork Sun Sep 29 11:16:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13815065 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A004145A0B; Sun, 29 Sep 2024 11:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727608706; cv=none; b=P6Xzi9t74dI/EPNEFQ5IaL6KTmeWh/ff5MBukw4HpkFK4wt8hEKyMnWy/GI5pUlvcVCfPp2us4B2823CMHwDjFs508NpFrfHXSq/AifachWPRE9/ymYxWARRFptepCi3NItMERR0nXnxnfVLAU6k8Pn8cqGNoMg3A36Snhfs7vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727608706; c=relaxed/simple; bh=G7PuCyjYWpXG0rrDP36eNUASlKrzStIDA2+lcE9u1O4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UZNI9LXHYvdU/MFM4Tdr6FluGNM15ZMiDWSzSWSCqpAyeBrgnpxYcYJRYm6TXpPIopHlV5zgbkl5tUuWqZmr1McAWOdL4RjtyXYEDEms51Qn0vt9lbESnFTRa1be9upFfJREwFf88MkqaklkYkjbOgvKkEhxW+4Io966DEluCl0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=NBKotQif; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="NBKotQif" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1727608702; bh=G7PuCyjYWpXG0rrDP36eNUASlKrzStIDA2+lcE9u1O4=; h=From:To:Cc:Subject:Date:From; b=NBKotQifR8pYpUQXsmZ2eqaf1ZBzpwQyTu3zYgLcLpFioqKIHJsuzShlIq6VY+gM0 rk9wBXqWwa65Y8qikre3fK30ktPdsm2Gpbj3tXhhM5VLxNnXhWB+lIvm8gfErUnikq G83xVtBiinVsPhQP4M1eGihVU5trQwcHUZh4X6XwtNhiOfsxPWMunTNusq91qROlUl ptLX0KHvL76WAcN7EUhfBSR7pmRCOSvs5HsIVRB5faz+XZoyIF1yuc8Es9zDq5RV9Y grPBNkJcvwoILvxF/g1KZ5Ys3DdIBeFQuSq4G3+8P4vxTjn8aJRaKHr1bpgvA8X3OY UjD79nlVO2vgw== Received: from thinkos.internal.efficios.com (unknown [IPv6:2606:6d00:100:4000:cacb:9855:de1f:ded2]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4XGhXG1dxhz695; Sun, 29 Sep 2024 07:18:22 -0400 (EDT) From: Mathieu Desnoyers To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Greg Kroah-Hartman , Sebastian Andrzej Siewior , "Paul E. McKenney" , Will Deacon , Peter Zijlstra , Boqun Feng , Alan Stern , John Stultz , Neeraj Upadhyay , Frederic Weisbecker , Joel Fernandes , Josh Triplett , Uladzislau Rezki , Steven Rostedt , Lai Jiangshan , Zqiang , Ingo Molnar , Waiman Long , Mark Rutland , Thomas Gleixner , Vlastimil Babka , maged.michael@gmail.com, Mateusz Guzik , Gary Guo , Jonas Oberhauser , rcu@vger.kernel.org, linux-mm@kvack.org, lkmm@lists.linux.dev, Nikita Popov , llvm@lists.linux.dev Subject: [PATCH v1 0/2] Introduce ptr_eq() to preserve address dependency Date: Sun, 29 Sep 2024 07:16:06 -0400 Message-Id: <20240929111608.1016757-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Introduce ptr_eq() to compare two addresses while preserving the address dependencies for later use of the address. It should be used when comparing an address returned by rcu_dereference(). Thanks, Mathieu Cc: Greg Kroah-Hartman Cc: Sebastian Andrzej Siewior Cc: "Paul E. McKenney" Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Alan Stern Cc: John Stultz Cc: Neeraj Upadhyay Cc: Boqun Feng Cc: Frederic Weisbecker Cc: Joel Fernandes Cc: Josh Triplett Cc: Uladzislau Rezki Cc: Steven Rostedt Cc: Lai Jiangshan Cc: Zqiang Cc: Ingo Molnar Cc: Waiman Long Cc: Mark Rutland Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: maged.michael@gmail.com Cc: Mateusz Guzik Cc: Gary Guo Cc: Jonas Oberhauser Cc: rcu@vger.kernel.org Cc: linux-mm@kvack.org Cc: lkmm@lists.linux.dev Cc: Nikita Popov Cc: llvm@lists.linux.dev Mathieu Desnoyers (2): compiler.h: Introduce ptr_eq() to preserve address dependency Documentation: RCU: Refer to ptr_eq() Documentation/RCU/rcu_dereference.rst | 32 +++++++++++--- include/linux/compiler.h | 63 +++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 5 deletions(-) Acked-by: Alan Stern