From patchwork Sat Sep 28 13:51:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13814690 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 28555188727; Sat, 28 Sep 2024 13:53:52 +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=1727531636; cv=none; b=lyHo+VsCuqv77BdY+MwUoroycdIaDwGdHPIMK5hJtCB3sE8gVnCY4eVp0zaK33oYj8G96Q4mpxFjhXfuNrCFc/it7rihi7QLsr2737a/SkrJtsCHYUolveuenw3eJXRU2emfoNxSFxyMkeJZf9rcMpG88ANli/jMKRqgHnpAQzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727531636; c=relaxed/simple; bh=AXylBb84Gi4ZLn9QbdSfWz1bezylh9IXiXx7KEkTzjs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PB3GtbhR3Qj0PpBweLio+W9jlxqw9h0KFSgzPvIGcYcYu9MCAoXTJEjggEowB0GC1PSEzG/ROpnQkvlPc0H/O+nOzQhDn0ejcD6dApqN0oAchnikLsXsDJ/De1LDmxR6aAHfomMG3Mcsp0iuC/Scu+SJ3yGp682QIvbMmPXOxgk= 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=q/B77HSh; 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="q/B77HSh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1727531631; bh=AXylBb84Gi4ZLn9QbdSfWz1bezylh9IXiXx7KEkTzjs=; h=From:To:Cc:Subject:Date:From; b=q/B77HShFdxTc/U7T2Q1s8y3U5mDSC/aRDqgMJJThc8YVccivPQM/rgth9IwRaxeH q44c9RUC6wckcPus36YKTqUj1+84amth0u/vDFEvEQ0i0txruTuKX+tWl5zQpyUmJN OJMnFaAtEfrx7mGTm8fj3CL1xhf60KrptOGMvyMB0hretwuZvD1wx03r/DMWurATlj 4XxAH5Xr44Pp7louBaDrFRsxAym3fVPLVypG5LFyDLOkGXPcftZJtVB/F601kzYnxd LNm7L2NJlaPKAiykaompuGpW35Qmu3DuVs5TkzZZoDOhU2wHjHNU+7DVOemv/7SU+z QvayCYLOM8vnA== Received: from thinkos.internal.efficios.com (unknown [IPv6:2606:6d00:100:4000:cacb:9855:de1f:ded2]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4XG82754zDz1bpl; Sat, 28 Sep 2024 09:53:51 -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 Subject: [PATCH 0/2] Introduce ptr_eq() to preserve address dependency Date: Sat, 28 Sep 2024 09:51:26 -0400 Message-Id: <20240928135128.991110-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 Mathieu Desnoyers (2): compiler.h: Introduce ptr_eq() to preserve address dependency Documentation: RCU: Refer to ptr_eq() Documentation/RCU/rcu_dereference.rst | 34 ++++++++++++--- include/linux/compiler.h | 62 +++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 5 deletions(-)