Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp952268rdd; Wed, 10 Jan 2024 04:41:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWVDw5fg/B7QnO4hmnxKW0EYmntqACwMNbmwLViw9StzhBkMdlfW7WzYRCNLHArbS0kLhm X-Received: by 2002:a17:906:59:b0:a28:c8bd:2592 with SMTP id 25-20020a170906005900b00a28c8bd2592mr980048ejg.54.1704890486177; Wed, 10 Jan 2024 04:41:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704890486; cv=none; d=google.com; s=arc-20160816; b=Q9g84M/KWToPRzr85olP2mRys2KCWHeNNJLBXVyuzJtgEtmjAwJszRmtBqb/t1OZ1c b8cg08Mexka2yD99Xz9g+y8gqzxNNIfPC8SLtCVcuTuWCGqsFaigQ9kkrAIskxqYkbDh Tcis8GtkESmIAEHEiUrsxRxJzoDtucpvx4po/W0VTQTkBu1i1EhcCJoTTEFAa2g91gWi c0OZ4xrBC3PINm6T61czjjvv0C7A722r338wikfG+j6sIfwvcAQEYOkTErLUzvjEtrsI cZolObKUDeOb5X8sbHfQiVKfe0Hfb3XuCRLX+zlZDq9/Dk6Olhd22ocwz8ZyfoibZmCy NFYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Y9jsUN/BVeIkcbXy/z5zJSURXSeGDLSMnvhduytMxik=; fh=R0RcnZAXfqtoIdmkRWdyA/u1ogVfjOLzJvt2P8rqtfw=; b=g4JJLJlMoUrVr/WNvRLSmZIdMISlzxgO7PiXOyHGVo5cBlEw7OV21Tr+tQ28gVl11V WJZCm5TzTxlsBu+vWPS3TAenS0KsEU2dUryREPyBbEoTxJ6KX95uHA+ij2pg4bnD8b+H S3cZD1GAHdFWKx+m1lAyTJDtRiKoOYZ1VZz3nccv6Vtndlu3I0msG3UIKdsv59JCU/h3 38yIiQdrtJN0I9t0PzfxAzfthp8yjth/zFgNY5YzhKbmRZ1+hYqhxhDalDghZyVH5O6n k9j/gazU+FTAq2X39ePl8k96wUXS770rxoF4knxKmTeRiSHxdOIl9uBTS0eszBsiYZg/ 8pAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=Gc9d3wuR; spf=pass (google.com: domain of linux-kernel+bounces-22176-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=semihalf.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q19-20020a170906389300b00a28165592f8si1801862ejd.255.2024.01.10.04.41.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 04:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22176-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=Gc9d3wuR; spf=pass (google.com: domain of linux-kernel+bounces-22176-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=semihalf.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 83E9E1F2733C for ; Wed, 10 Jan 2024 12:41:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 156344878E; Wed, 10 Jan 2024 12:40:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=semihalf.com header.i=@semihalf.com header.b="Gc9d3wuR" Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34C8C48788 for ; Wed, 10 Jan 2024 12:40:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=semihalf.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=semihalf.com Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5534dcfdd61so7249115a12.0 for ; Wed, 10 Jan 2024 04:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; t=1704890450; x=1705495250; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y9jsUN/BVeIkcbXy/z5zJSURXSeGDLSMnvhduytMxik=; b=Gc9d3wuRjWi9XYno5/3tru0I7+ClNwDGNQ5S6mMV7xykhEZOZ3smWYtvlu1comOsda R7w6U7xEYoO9DiaE05xTBVC+XmrR9kU/kuREAIFzvF5LTw9eldpuRk/ngCMqngnwueOa qo6x+vs9MPAPLesIUZYRlKsO9Ho+JyuiLVh1Z51OQFIC8BENlR+P6iL6mGCE8vfmlQNg h2CBPqZULH82r5+mnSpiO1fEPVo0wO6nJYOrS06i+Z3NLCkrb+93n+ZhcQHVhnNKS6jQ fY1vaA83jGnlQ75lVEOpmOwY5Dy9SHikDNBddeobVcgLIj6z//H4n4c1FQF7HhRQFIfP w6Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704890450; x=1705495250; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y9jsUN/BVeIkcbXy/z5zJSURXSeGDLSMnvhduytMxik=; b=wlS3e6RtRdTDbyMSoZL36P36dUl7+QruTeiJM2eD52lOhaxu2GIDHoSVVrxNxe7Kz4 qGkATvYs5XOGApoM+iILcF+nU7VbVSDTqCZ16vT4pJ3WXsclDhQaVUqoWm364JzLPRYE WSRl6t+CNh2GRFAhzi8/nLmvg2abgZRpi546IKP4U/bTum+D5e9xZA6tVW6hH7axy8Jt BmMC6m65eZDRv0FWYfWEhKukyrQHoTf9TcHCD9P8UFO0xVYXvSho7QQInmen4swSTC1c DDEjrkbB2/GCShcj6TAz29WESh1fkUVQ6B68qIE/IjHx4/8r2dl7LiKadeAFd5zy1/5d duqA== X-Gm-Message-State: AOJu0YxjvqmGPeD8z7qDlg0jtuHELX1YqCmremQ+1oG079v8B3F2WCn8 1QWwnFGhBZ5+YyrpsJLjmIeg7DK3IIrBH3oWbGnIr0zUm0dQ X-Received: by 2002:aa7:c1d8:0:b0:557:e391:ec65 with SMTP id d24-20020aa7c1d8000000b00557e391ec65mr655363edp.20.1704890450415; Wed, 10 Jan 2024 04:40:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231130234048.157509-1-lb@semihalf.com> <20231130234048.157509-11-lb@semihalf.com> <69bd53de-0948-469f-ae58-48098af1973c@akamai.com> In-Reply-To: From: =?UTF-8?Q?=C5=81ukasz_Bartosik?= Date: Wed, 10 Jan 2024 13:40:38 +0100 Message-ID: Subject: Re: [PATCH v2 10/15] dyndbg: add open and close commands for trace To: jim.cromie@gmail.com, Jason Baron Cc: Andrew Morton , Kees Cook , Douglas Anderson , Guenter Roeck , Yaniv Tzoreff , Benson Leung , Steven Rostedt , Vincent Whitchurch , Pekka Paalanen , Sean Paul , Daniel Vetter , linux-kernel@vger.kernel.org, upstream@semihalf.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable wt., 9 sty 2024 o 16:20 napisa=C5=82(a): > > On Fri, Jan 5, 2024 at 3:46=E2=80=AFPM Jason Baron wr= ote: > > > > On 11/30/23 6:40 PM, =C5=81ukasz Bartosik wrote: > > > Add open and close commands for opening and closing trace instances. > > > The open command has to be mandatory followed by a trace instance nam= e. > > > If a trace instance already exists in /tracing/instances > > > directory then the open command will reuse it otherwise a new trace > > > instance with a name provided to the open will be created. Close > > > command closes previously opened trace instance. The close will > > > fail if a user tries to close non-existent trace instances or an > > > instance which was not previously opened. > > > > > > For example the following command will open (create or reuse existing= ) > > > trace instance located in /tracing/instances/usbcore: > > > > > > echo "open usbcore" > /dynamic_debug/control > > > > Hi, > > > > I'm wondering why this needs to be part of dynamic debug? Can't we make > > trace instances via 'mkdir' and then use those from the dynamic debug s= ide? > > > > I believe thats what happens now - > > open foo on already opened foo is not an error. > so if the instance is already created, it just gets used, without > clearing the buffer. Yes, I confirm this behavior. > So it can integrate with externally admin'd tracebufs. > > the open foo requirement means that we can validate foo, > and error properly if it is mis-spelled > > > > > Thanks, > > > > -Jason > > > >