From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kAh0FS8mu2jYyxgAWB0awg (envelope-from ) for ; Fri, 05 Sep 2025 14:04:31 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=z4cLW59C; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F13431E087; Fri, 05 Sep 2025 14:04:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from lists.lttng.org (lists.lttng.org [158.69.130.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 62FE01E047 for ; Fri, 05 Sep 2025 14:04:29 -0400 (EDT) ARC-Filter: OpenARC Filter v1.2.1 lists.lttng.org 4cJPPS5zzGz290W ARC-Seal: i=1; d=lists.lttng.org; s=arc1; a=rsa-sha256; cv=none; t=1757095469; b=IWOLQNkFeRo6lIeisDLtWmG7eix3UmHAuc9Rgr4FXAS13EonguONw84vwUrGx37LCKEe QSFJcEMbYKe9Nc6e99TpGCxXJlEnpTSxeFMtLSqDOcwGWrkOzFvKARFXfwSS/1IvAGnAD wRNFICOK9OzMXT58cXLBIHeeaTWcfY8P87sPUKCBD70xNfXzYtkexOH9tXEakj2+Y9EG0 f0vDchWdLhBVxmQDVVunvM3EFAdHtvBQKMMnQUDQZTDbissChTQQnyDOZjKPwmqjCeFQo LVwwYzireGVZeRtg/BRj7GS+crsgVEvIEdE1sUGMAzBsRZV6SWesKtjxI0WaVP0CTnA== ARC-Message-Signature: i=1; d=lists.lttng.org; s=arc1; a=rsa-sha256; c=relaxed/simple; t=1757095469; h=DKIM-Signature:To:Subject:Date:Message-ID:MIME-Version:From:From; bh=12EpahFrErfhUFDkQ6Yga/RptJjBjHybWmNf2/ORbRQ=; b=VYEGbpqLelSzidpOsuSypUxIpjGIRp7Lm0+huBxSXkZdc3qe2cw0Wv1WSLFPZ6s7qfTq 2aNM/r+4eRNQ/cyhXUkTvrT/AhBUNozpEabArDgGCDbVTH2fuSkla4gD8K5v8X0Utg8H0 Hy73IcJt/RxyH/s22Od9K2YVa9D53QsunjBfZ83YbsLq3fPG908rtwvsjhosxVIzKZlNe bpabrwEs8vAma9Dc7Fbq2NxijiJWAWdTbPhSwMTxAL65j3fOmQFt7WxZWIn/KCwNyhQvk JyxQmSMjbUI9bfjjDhECSZz4+sM5FArdnz+bj2RhHQ6L5dGQkqcET5Gcvk4tm+NIZDg== ARC-Authentication-Results: i=1; lists.lttng.org; arc=none smtp.remote-ip="::1" DKIM-Filter: OpenDKIM Filter v2.11.0 lists.lttng.org 4cJPPS5zzGz290W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1757095469; bh=12EpahFrErfhUFDkQ6Yga/RptJjBjHybWmNf2/ORbRQ=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=z4cLW59CCX5OT7/ZDWKX7Sb9WSaYlizidCVuZEAJU73brPZhkouxO9q9SS+P7ghmt lcdDTwafOR/m6qZ5L+5K0sU47NnUntCOMNKIdGii4DarJYuXr+yaofGgNxCdD+lRAJ lAbWdRvdRCEtIx6Fxo3wG7nEyBbK4ROUTcGxeTGxLiow2aSBW397uxdqQYrMSSQ2om bo1qqTNKU8v+jKEi7Ob9unfAF080+bjrD0O5gF6empw0smCjQ40xrfB9obtiL/75Uj Q3/QEUOy+WejLtfZUmW+4aIB8qwtTudBKid/pEBVe3U/5lAr51UW8tS8vUm4fdGMAG zpNlmhhvsx+nA== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4cJPPS5zzGz290W; Fri, 5 Sep 2025 14:04:28 -0400 (EDT) ARC-Filter: OpenARC Filter v1.2.1 lists.lttng.org 4cJPPR67T5z28sy DKIM-Filter: OpenDKIM Filter v2.11.0 lists.lttng.org 4cJPPR67T5z28sy Received: from smtpout.efficios.com (smtpout.efficios.com [158.69.130.18]) by lists.lttng.org (Postfix) with ESMTPS id 4cJPPR67T5z28sy for ; Fri, 5 Sep 2025 14:04:27 -0400 (EDT) Received: from localhost (199-193-172-8.cpe.axion.ca [199.193.172.8]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4cJPPL22Z0z8Qt; Fri, 05 Sep 2025 14:04:22 -0400 (EDT) To: Thobias Knudsen Subject: Re: URCU feature request? In-Reply-To: Organization: EfficiOS References: <3c49eadb-f310-46b2-984d-58a0c193cde9@efficios.com> <2f0dc1b4-3fcb-453c-aa42-4a1f85623300@paulmck-laptop> <87y0qwwc6j.fsf@laura> Date: Fri, 05 Sep 2025 14:04:21 -0400 Message-ID: <87h5xg7p3u.fsf@laura> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Olivier Dion via lttng-dev Reply-To: Olivier Dion Cc: lttng-dev@lists.lttng.org Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" On Thu, 04 Sep 2025, Thobias Knudsen wrote: >> I am confuse about the overall discussion here. Are we talking about >> static checking of RCU pointers usage or runtime checking? >> >> Is is possible to see the implementation you made so I can understand >> better? > > Sorry for being late to answer :/ > The library overrides a subset of urcu and lfht functions with macros and > replaces them with other functions which checks in runtime if the functio= ns > are called in the correct order. > here is the code: https://github.com/ThobiasKnudsen/urcu_lfht_safe It looks like you want runtime verification for the usage of the API. Did you know that URCU can now be compiled against ThreadSanitizer (TSAN)? If a user misuses the API or makes incorrect assumptions about the guarantees offered by RCU, TSAN will most likely detect those issues. Coupled with the other debug features we already have, this makes it very hard to not trigger an error path when the API is used incorrectly. Note that certain kind of errors could actually be flag at compile time with the proper tooling. For example, the Linux kernel uses a `__rcu' attribute that Sparse can understand to flag improper use of RCU=E2=80=91protected pointers. I=E2=80=99d be very open to exposing somet= hing similar (an attribute) for static checkers. [...] Thanks, Olivier --=20 Olivier Dion EfficiOS Inc. https://www.efficios.com