Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp437899pxx; Mon, 26 Oct 2020 11:55:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV0l3Fu7e4KSt85rZCOiHFncCKQPzlkakiK/d5px6pGYYhuqOZMGjupn91zLsWdIR17WpM X-Received: by 2002:a17:906:4306:: with SMTP id j6mr17722353ejm.523.1603738513620; Mon, 26 Oct 2020 11:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603738513; cv=none; d=google.com; s=arc-20160816; b=gpSh5PlcOfJPlr05OgIRJKGqiMgw1DzzVy1qF3IWCj2oQjRXOaPEmed96JM6Jz1F+Y f6G+jbtgQQDBdJN1Y93ZnTMHGmJ/cV6g5/P4z5r6bVkTuZDHhQJh7FKc0LBgCLiGyRu6 iIC5jaoTyeTb33FGz6w+9Pg/z0H+An85IDigLg4xRevPlduadQ5vBtmM8O8942xHWbz3 2oBIHFaWmzl8ZSCCfacJsxPcUoiZK4DuriKszNTF4cyzHR9XMptQouAV7RnA1nw/1k// q3OKfm43EpHJ4EeRkHfvdPNyY9cU9O0DaR7uxLsoRC8hpyj4EY3dkN63mkeGKNLo3x46 jUSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=6kyfJ3qYZiiuFIXTPFsjfa34MVAVj0mAn1W43oHSblk=; b=vlAyD9ZawkN9QKHu0GFBteajyjCYTauQla1zKvC4SREpgyczWRv8mEd2ejmZgQc9E+ i7xRHbCTbgd4g6Q2s01S+TBgg/ejguupyGuCq0/X3F5lSPChrhiTSWh8AYampiUhO6b6 yURyIapacXmj/n8gWBokl2hp6oJDcNPbqGLthl0lNoFL9JmfPYUy57HXsICHJF7vPb8b Vqga4vuzfrfrid2C/iRbWnEluFi4CTycQg8u1uRR7+HyyIfP2qlNPFgPLmbbN5HD4ycK k3pHF71QWF+r8q/aaGRVFMj3G+2zi9El2JGN/mPWErdaogYTyvP/WyX5Bgj/eIuabmOZ xUDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eAJUPo9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz9si7993308ejb.203.2020.10.26.11.54.51; Mon, 26 Oct 2020 11:55:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eAJUPo9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1783087AbgJZPGR (ORCPT + 99 others); Mon, 26 Oct 2020 11:06:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:44298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1782911AbgJZPGR (ORCPT ); Mon, 26 Oct 2020 11:06:17 -0400 Received: from localhost.localdomain (c-73-209-127-30.hsd1.il.comcast.net [73.209.127.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D302C20773; Mon, 26 Oct 2020 15:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603724776; bh=wPnQA0vAtCRct+DBZ1Y0pyL8y0njdzHTr8jEsRE+KGI=; h=From:To:Cc:Subject:Date:From; b=eAJUPo9saOkamsXgedDspq20qnWJqbdmAa51NIKci6oCJIk5OLlzOU/cbEX1a203J IPrFI1XJ49TjwIXlQH4NpUBXfm6aW7bHcmePXHMHpWAQRMqOHP8YWtbz0/l4BFIT/j 8hYi4hSuLe7MOnMP1sUODoulcO44x05ys+jV2dIE= From: Tom Zanussi To: rostedt@goodmis.org, axelrasmussen@google.com Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/5] tracing: More synthetic event error fixes Date: Mon, 26 Oct 2020 10:06:08 -0500 Message-Id: X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is v3 of the sythetic event error fix patchset. As suggested by Masami, I split the 'tracing/dynevent: Delegate parsing to create function' into two - one containing just the interface changes and the second with the synthetic event parsing changes the first enabled. I also replaced a couple argv_split() with strpbrk() as suggested by Masami, along with removing the no-longer-used consume lines and another line that tested ECANCELED that was no longer needed. Also, removed a test case that was no longer needed since the commands are now stripped of whitespace first. Thanks, Masami, for the suggestions. Tom v2 text: This is v2 of the previous sythetic event error fix patchset. This version drops the original ([PATCH 1/4] tracing: Make trace_*_run_command() more flexible) and (tracing: Use new trace_run_command() options) patches and replaces them with Masami's patch (tracing/dynevent: Delegate parsing to create function) [1]. The new version adds in all the synthetic event changes needed to compile and use the new interface. A new patch was also added (selftests/ftrace: Add synthetic event field separators) that fixes more invalid synthetic event syntax I found while testing. I also added some more new checks to the synthetic event sytax error testcase. As before, I didn't see any problems running the entire ftrace testsuite or the test modules that also use the things that were touched here. [1] https://lore.kernel.org/lkml/20201019001504.70dc3ec608277ed22060d2f7@kernel.org/ Thanks, Tom v1 text: Hi, This patchset addresses the synthetic event error anomalies reported by Masami in the last patchset [1]. It turns out that most of the problems boil down to clunky separator parsing; adding a couple new abilities to trace_run_command() and then adapting the existing users seemed to me the best way to fix these things, and also gets rid of some code. Also, to make things easier for error display, I changed these to preserve the original command string and pass it through the callback instead of rebuilding it for error display. I added some new error strings and removed unused ones as well, and added a bunch of new test cases to the synthetic parser error test case. I didn't see any problems running the entire ftrace testsuite or the test modules that also use the things that were touched here. Thanks, Tom [1] https://lore.kernel.org/lkml/20201014110636.139df7be275d40a23b523b84@kernel.org/ The following changes since commit b37b1f9a6311469937aae1c039db00e5b75b9fcb: tracing, synthetic events: Replace buggy strcat() with seq_buf operations (2020-10-23 19:05:12 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/zanussi/linux-trace.git ftrace/synth-fixes-v3 Masami Hiramatsu (1): tracing/dynevent: Delegate parsing to create function Tom Zanussi (4): tracing: Rework synthetic event command parsing tracing: Update synth command errors selftests/ftrace: Add synthetic event field separators selftests/ftrace: Update synthetic event syntax errors kernel/trace/trace.c | 23 +- kernel/trace/trace.h | 3 +- kernel/trace/trace_dynevent.c | 35 ++- kernel/trace/trace_dynevent.h | 4 +- kernel/trace/trace_events_synth.c | 235 +++++++++++------- kernel/trace/trace_kprobe.c | 33 +-- kernel/trace/trace_probe.c | 17 ++ kernel/trace/trace_probe.h | 1 + kernel/trace/trace_uprobe.c | 17 +- .../trigger-inter-event-combined-hist.tc | 4 +- .../trigger-onmatch-action-hist.tc | 2 +- .../trigger-onmatch-onmax-action-hist.tc | 2 +- .../trigger-synthetic_event_syntax_errors.tc | 35 ++- .../inter-event/trigger-trace-action-hist.tc | 2 +- 14 files changed, 257 insertions(+), 156 deletions(-) -- 2.17.1