Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp619850rdb; Thu, 22 Feb 2024 14:06:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV7SDGYjcYTrGaxY3tSkznOmNQPxfST9vE2yWvfFDUbTIlu3FGyml8CfqcK4QyqiP+RocOpTp2/eKUFKytxctCbcLGAoXb9sfvkk4vIKQ== X-Google-Smtp-Source: AGHT+IHwhz32/wHL2ohodoplNBiXAfSylFxGxT/mQygBGffSaL82zfbu18YmQhXqVT9KmYomrR6o X-Received: by 2002:a05:6870:b150:b0:21e:623b:176 with SMTP id a16-20020a056870b15000b0021e623b0176mr267060oal.33.1708639615752; Thu, 22 Feb 2024 14:06:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708639615; cv=pass; d=google.com; s=arc-20160816; b=uHYpN0OenIoAt7fQOdV26Nbk8hvBwHltJxWpTuTaXsKPWOYJawFbu83twTC5iaksfc xDO0nPyl+EZBH2AV40qm4/FmWGPhAHU52F+taGoBZQVhuXdy+q1kcG8DDIkJE8jAAx7y msFATU9lU7XVQoxFPmNEuY8v+jV6wbK1o84rl5S0U/NRW2K4kmwOHqsf+dmRb65IYI7F ozpL/v5SvNlK3xvGPvmn4cn7vkX6rSG+BGasSL3IKT+KRgCcbhDlilfmFub0+bzhx/ss SEV5N+D6JNkE0ICBe84ruq+AmUyqo3kkGbgmMMbPvsoCXyCdcup3fy0xkIxhdzw4Ovtd 7zJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=qqGW105hPv+bnys7G2tYT6g19HYmE73BCuL7PbUKYVA=; fh=UgJ1M/WLDuBX5Hd7iWpdBibTSPJm5+ZRhFuzMIW+uy0=; b=DIG27NOvWFbE5NvmZg4nai6a8owgpL1dNURIz2ddJ8KTr/7gUBN07Vxi7/6GOWj+o7 q8OHt8T/+bpXuXLSJJoDrUN4OqE1SU28+5vCjG0reSOxMOztJn+jQLlz4q7n01TNpVsO w1Fv6Wad6fVz0Ti0z/yMud8AP0P7TAv9s/2uCWejQhLfN4B2wRiCKNaSOSMLbVtmm+JJ xoHjBR46Uw7IHiaKHSl7a0m5J23dKwxZ31H42TxR7MZPMJQFPIM3GUuf3OB7WvujCk+x GAJrgjO9tGdC44ag364MV/qJRvf/fXfAo0NZpegYXiScGrBBZCl+qAo7F6Pvov1oXC9s kyeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-77445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77445-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k9-20020ac84749000000b0042e4c1067d7si2061330qtp.584.2024.02.22.14.06.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 14:06:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-77445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77445-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6C9721C244F1 for ; Thu, 22 Feb 2024 22:06:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42A0A12D210; Thu, 22 Feb 2024 22:06:50 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BE8ED14B81E; Thu, 22 Feb 2024 22:06:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708639609; cv=none; b=nOdza6Om5F1IdHbMmHE4T6qLu6Ja9H6KZf9FnLm7pNt5PA3PPOe1oQfT57UFWQiCRvVjPFHiShQwclniEZo9lODGlE3GaMSPnyDpW0C/ES36QPigKx/3uIGXCZGwIo1hmiAY8fSvKLv/kBV64m3NISdCY4j5EpVRGeFWTgklNqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708639609; c=relaxed/simple; bh=CcqVXZKOZvvXSd+1YjEThyoYmIB+ItQXeZkjhL40xkw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=geZrlWdRg8qjYtsfKZAlCMcC1W105hnyzrFhsAuKpAZyZYK73bWwOe2kYyEeSHCUgsaPfdPI3YZZ3utuVvO+GOZviIcaW4dyr93oxsdtyw7vFwW6nRkh38jN8C7ux0cu1N3z8QhycaFx1SUK7r8U2tdJo+PgiXezrlGFGYIXCbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99E38C433F1; Thu, 22 Feb 2024 22:06:48 +0000 (UTC) Date: Thu, 22 Feb 2024 17:08:39 -0500 From: Steven Rostedt To: Beau Belgrave Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com Subject: Re: [PATCH v4 1/4] tracing/user_events: Prepare find/delete for same name events Message-ID: <20240222170839.71c0b1bf@gandalf.local.home> In-Reply-To: <20240222001807.1463-2-beaub@linux.microsoft.com> References: <20240222001807.1463-1-beaub@linux.microsoft.com> <20240222001807.1463-2-beaub@linux.microsoft.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 22 Feb 2024 00:18:04 +0000 Beau Belgrave wrote: > The current code for finding and deleting events assumes that there will > never be cases when user_events are registered with the same name, but > different formats. Scenarios exist where programs want to use the same > name but have different formats. An example is multiple versions of a > program running side-by-side using the same event name, but with updated > formats in each version. > > This change does not yet allow for multi-format events. If user_events > are registered with the same name but different arguments the programs > see the same return values as before. This change simply makes it > possible to easily accomodate for this. accommodate? ;-) > > Update find_user_event() to take in argument parameters and register > flags to accomodate future multi-format event scenarios. Have find accommodate > validate argument matching and return error pointers to cover when > an existing event has the same name but different format. Update > callers to handle error pointer logic. > > Move delete_user_event() to use hash walking directly now that > find_user_event() has changed. Delete all events found that match the > register name, stop if an error occurs and report back to the user. > > Update user_fields_match() to cover list_empty() scenarios now that > find_user_event() uses it directly. This makes the logic consistent > accross several callsites. across ? I'll update this. -- Steve > > Signed-off-by: Beau Belgrave