netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Arnaldo Carvalho de Melo" <acme@redhat.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Luis Cláudio Gonçalves" <lclaudio@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Wang Nan" <wangnan0@huawei.com>,
	"Sasha Levin" <sashal@kernel.org>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: [PATCH AUTOSEL 5.0 212/262] perf trace: Fixup etcsnoop example
Date: Wed, 27 Mar 2019 14:01:07 -0400	[thread overview]
Message-ID: <20190327180158.10245-212-sashal@kernel.org> (raw)
In-Reply-To: <20190327180158.10245-1-sashal@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

[ Upstream commit 1d59cb1bbd4cbe5a8f8032242cdacea5658129cf ]

Where we don't have "raw_syscalls:sys_enter", so we need to look for a
"*syscalls:sys_enter*" to initialize the offsets for the
__augmented_syscalls__ evsel, which is the case with etcsnoop, that was
segfaulting, fixed:

  # trace -e /home/acme/git/perf/tools/perf/examples/bpf/etcsnoop.c
     0.000 (         ): gnome-shell/2105 openat(dfd: CWD, filename: "/etc/localtime")                       ...
   631.834 (         ): cat/6521 openat(dfd: CWD, filename: "/etc/ld.so.cache", flags: RDONLY|CLOEXEC) ...
   632.637 (         ): bash/6521 openat(dfd: CWD, filename: "/etc/passwd")                          ...
  ^C#

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: b9b6a2ea2baf ("perf trace: Do not hardcode the size of the tracepoint common_ fields")
Link: https://lkml.kernel.org/n/tip-0tjwcit8qitsmh4nyvf2b0jo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/perf/builtin-trace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 2776ff8c3e81..91cdbf504535 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3868,7 +3868,8 @@ int cmd_trace(int argc, const char **argv)
 				goto init_augmented_syscall_tp;
 			}
 
-			if (strcmp(perf_evsel__name(evsel), "raw_syscalls:sys_enter") == 0) {
+			if (trace.syscalls.events.augmented->priv == NULL &&
+			    strstr(perf_evsel__name(evsel), "syscalls:sys_enter")) {
 				struct perf_evsel *augmented = trace.syscalls.events.augmented;
 				if (perf_evsel__init_augmented_syscall_tp(augmented, evsel) ||
 				    perf_evsel__init_augmented_syscall_tp_args(augmented))
-- 
2.19.1


  parent reply	other threads:[~2019-03-27 19:17 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190327180158.10245-1-sashal@kernel.org>
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 012/262] net/mlx5e: Fix access to non-existing receive queue Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 013/262] net/mlx5: Avoid panic when setting vport rate Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 014/262] net/mlx5: Avoid panic when setting vport mac, getting vport config Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 016/262] xsk: fix to reject invalid flags in xsk_bind Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 020/262] netfilter: nf_tables: fix set double-free in abort path Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 022/262] net: stmmac: Avoid sometimes uninitialized Clang warnings Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 023/262] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK Sasha Levin
2019-03-27 17:57 ` [PATCH AUTOSEL 5.0 024/262] libbpf: force fixdep compilation at the start of the build Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 053/262] netfilter: nf_tables: check the result of dereferencing base_chain->stats Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 055/262] netfilter: conntrack: tcp: only close if RST matches exact sequence Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 063/262] wil6210: check null pointer in _wil_cfg80211_merge_extra_ies Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 064/262] mt76: fix a leaked reference by adding a missing of_node_put Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 065/262] ath10k: Fix the wrong updation of BW in tx_stats debugfs entry Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 069/262] tools/bpf: selftests: add map lookup to test_map_in_map bpf prog Sasha Levin
2019-03-27 17:58 ` [PATCH AUTOSEL 5.0 079/262] ath10k: don't report unset rssi values to mac80211 Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 087/262] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 088/262] ice: fix ice_remove_rule_internal vsi_list handling Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 093/262] net: dsa: mv88e6xxx: Add lockdep classes to fix false positive splat Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 094/262] net: hns3: fix setting of the hns reset_type for rdma hw errors Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 095/262] veth: Fix -Wformat-truncation Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 096/262] e1000e: Fix -Wformat-truncation warnings Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 097/262] mlxsw: spectrum: Avoid " Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 116/262] mwifiex: don't advertise IBSS features without FW support Sasha Levin
2019-03-27 18:08   ` Brian Norris
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 127/262] mt76: usb: do not run mt76u_queues_deinit twice Sasha Levin
2019-03-27 17:59 ` [PATCH AUTOSEL 5.0 140/262] tools build: Add test-reallocarray.c to test-all.c to fix the build Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 145/262] iwlwifi: pcie: fix emergency path Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 149/262] selftests: skip seccomp get_metadata test if not real root Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 153/262] netfilter: conntrack: fix cloned unconfirmed skb->_nfct race in __nf_conntrack_confirm Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 157/262] ath10k: fix shadow register implementation for WCN3990 Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 165/262] net: marvell: mvpp2: fix stuck in-band SGMII negotiation Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 167/262] net: phy: consider latched link-down status in polling mode Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 172/262] bpf: test_maps: fix possible out of bound access warning Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 177/262] e1000e: fix cyclic resets at link up with active tx Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 178/262] e1000e: Exclude device from suspend direct complete optimization Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 182/262] iwlwifi: mvm: fix RFH config command with >=10 CPUs Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 192/262] nfp: bpf: correct the behavior for shifts by zero Sasha Levin
2019-03-27 18:14   ` [oss-drivers] " Jakub Kicinski
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 195/262] mt7601u: bump supported EEPROM version Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 200/262] bpf: fix missing prototype warnings Sasha Levin
2019-03-27 18:00 ` [PATCH AUTOSEL 5.0 201/262] selftests/bpf: skip verifier tests for unsupported program types Sasha Levin
2019-03-27 18:01 ` Sasha Levin [this message]
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 218/262] selftests/bpf: suppress readelf stderr when probing for BTF support Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 221/262] Bluetooth: Verify that l2cap_get_conf_opt provides large enough buffer Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 233/262] netfilter: physdev: relax br_netfilter dependency Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 234/262] nfp: flower: tidy tunnel related private data Sasha Levin
2019-03-27 18:15   ` [oss-drivers] " Jakub Kicinski
2019-04-03 16:20     ` Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 245/262] brcmfmac: Use firmware_request_nowarn for the clm_blob Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 246/262] wlcore: Fix memory leak in case wl12xx_fetch_firmware failure Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 258/262] net: stmmac: Avoid one more sometimes uninitialized Clang warning Sasha Levin
2019-03-27 18:01 ` [PATCH AUTOSEL 5.0 259/262] appletalk: Fix compile regression Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190327180158.10245-212-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=lclaudio@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).