Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2480983rdb; Wed, 21 Feb 2024 08:53:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX1A17xYCWRuUUTX44kq2xDenn2XNouZ+aRPmboQ6yTB0FTyK9S0uk0+7jpYl6cefTd2uP3ikj41ZXJHN7lDXR3exUQdb6BMYFn8vcckQ== X-Google-Smtp-Source: AGHT+IGd+7vQoPX66XpkZh5XIRTg/rnlgDG0tO1+r9fOPvdngk+LuyEoXwzixwJyis198JDtDmVG X-Received: by 2002:a05:6358:1093:b0:17b:6a36:912a with SMTP id j19-20020a056358109300b0017b6a36912amr668272rwi.19.1708534438998; Wed, 21 Feb 2024 08:53:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708534438; cv=pass; d=google.com; s=arc-20160816; b=UvAfw5UkuXJnGV1y+1GrrDqTbn+upIi2zR/Vx4Br6rYIVnGovHbLglzFerPlUJMaSS XpY5TiHCaTzeZ18FJe9Y8SOX02dOILRGdyqVphdISzznV4es2ptvvyv0qe2uu4JTgpOE 4KuLHqwTojlplAx7GG5SJ7soXZiw5EVwIISzkpFrWGzCEOxj+hlioUuQuUSuHWwatNDX sg57e9jIVJcltaS7eIkB6YldX1zGGZxsoTCqwmOqEovRR8A8lNlT+aXf1IHMQ81mEEKa OcDCgwIXPmVrlzaBdgfREmz2QQvRjxlPSjOAmsw0JSNNaf31XXGf22X0qn9NJUkwVE/H 1jtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter; bh=WoWK2cdZE5hAZaE+2mXpfqVJo/Fqx/LjLI1coCuc52g=; fh=UMpZDulOCg4M3/GEQ7keBo/HKUMjeux24MdE7pCx2m8=; b=G4bxc2iwjvc+swZIuT4FWSZcIUqF96mMsRvw50GLcqLW5YGsFIQWB5UFKpf1+gu+qR fqBwUeQZMzh+XpnmEFSjmac3kUJLhr+v5wQgOgH6ZH5sY0gDE+RjvNgLciN7SnHt+j1h JfeYDdt+RkhC6b8oThm8cbEhYfvtS+AY5LRRTDMt2GPl+gS8UOSoZOCqnGulcS+Lkh6K 7/bwtoobp0H0GldtDhkLHAXXiec35ncuKjpjipdUuimOiPPAWBc/iBP+wi0NZp80Cr1M m3adEsWLd5taFlHcZuFC8SuwcdVI80biEeQxaiR+kCnw/9JynnUOMrRZ6VaTfScJPr+c 3dEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=fr3pny1G; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-75143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s7-20020a635e07000000b005dc528d603bsi8280576pgb.675.2024.02.21.08.53.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 08:53:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=fr3pny1G; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-75143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A76CA28314A for ; Wed, 21 Feb 2024 16:53:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B1FF82D9F; Wed, 21 Feb 2024 16:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="fr3pny1G" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CD388120C; Wed, 21 Feb 2024 16:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708534430; cv=none; b=DxlixcWNB0JSD7j6fZYYhxrJpZu75YO/5uIJmXfLLBBRahPAtGV8Tb9+uNv2PoPP37nncrClvpc7gBM+gpRr+Ge221VgDXmN/PSYkgv+p/QhDwB9yYZP338nxgh7NX9V3a9vdqFXk4vf4HYcWlFnjUsdKVER+eMRP9TFvo2pQnE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708534430; c=relaxed/simple; bh=AxeeFvoKkLDcSkOcVOKeQwzTbC26QJBy/Prx61GhjMo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OIhrPNYhE4b/CqmP4RDw+0kLTnSIJLzj3KpG9sFWLq8+7kOhpnKO7WWuBG8lQMNWM9XL1sLKXNGC7hCDBMrJxnhsHnM9TRyWJNk4p2DPQ5r8Q9TO8LRTXJdhJmHfSv/Qzq5BWlk2U8DJVpN7PMOVZxeMbeooHl7uaqBWo4TTNvA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=fr3pny1G; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from DESKTOP-4OLSCEK. (c-76-135-27-212.hsd1.wa.comcast.net [76.135.27.212]) by linux.microsoft.com (Postfix) with ESMTPSA id 3846A20B2000; Wed, 21 Feb 2024 08:53:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3846A20B2000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708534423; bh=WoWK2cdZE5hAZaE+2mXpfqVJo/Fqx/LjLI1coCuc52g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fr3pny1GK3v+9/F9gBlLYrMCOgBpMSr8hLdVINUQFJvVBNDlt7wGE1nSPJuUoDvnQ Mc7YYA8NxnVv2lkSnnOZc3tYEQYnC+XjCxXr8bepjMfP+P2vsyF5dSzoFonbLK6Ug2 YTclTNDCTk6KSinCTNwaP9pIxd0BGnybE1Fa51FY= Date: Wed, 21 Feb 2024 08:53:37 -0800 From: Beau Belgrave To: Steven Rostedt Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com Subject: Re: [PATCH v3 2/4] tracing/user_events: Introduce multi-format events Message-ID: <20240221165337.GA441-beaub@linux.microsoft.com> References: <20240214175046.240-1-beaub@linux.microsoft.com> <20240214175046.240-3-beaub@linux.microsoft.com> <20240221102104.6ab80e5a@gandalf.local.home> 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-Disposition: inline In-Reply-To: <20240221102104.6ab80e5a@gandalf.local.home> On Wed, Feb 21, 2024 at 10:21:04AM -0500, Steven Rostedt wrote: > On Wed, 14 Feb 2024 17:50:44 +0000 > Beau Belgrave wrote: > > > Currently user_events supports 1 event with the same name and must have > > the exact same format when referenced by multiple programs. This opens > > an opportunity for malicous or poorly thought through programs to > > create events that others use with different formats. Another scenario > > is user programs wishing to use the same event name but add more fields > > later when the software updates. Various versions of a program may be > > running side-by-side, which is prevented by the current single format > > requirement. > > > > Add a new register flag (USER_EVENT_REG_MULTI_FORMAT) which indicates > > the user program wishes to use the same user_event name, but may have > > several different formats of the event in the future. When this flag is > > "of the event in the future." Does it have to be in the future? Is there > use case where an application might legitimately want the same event name > with different formats? > You're right, our use cases are mostly around future facing/compat. There are valid cases where you just want several different formats with the same name. I'll drop the "in the future", so it'll just be "several different formats". Thanks, -Beau > -- Steve > > > used, create the underlying tracepoint backing the user_event with a > > unique name per-version of the format. It's important that existing ABI > > users do not get this logic automatically, even if one of the multi > > format events matches the format. This ensures existing programs that > > create events and assume the tracepoint name will match exactly continue > > to work as expected. Add logic to only check multi-format events with > > other multi-format events and single-format events to only check > > single-format events during find. > >