lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <166693931760.29415.616914088747555584.tip-bot2@tip-bot2>
Date:   Fri, 28 Oct 2022 06:41:57 -0000
From:   "tip-bot2 for James Clark" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     James Clark <james.clark@....com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Namhyung Kim <namhyung@...nel.org>,
        SeongJae Park <sj@...nel.org>,
        Athira Rajeev <atrajeev@...ux.vnet.ibm.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: perf/urgent] perf: Fix missing raw data on tracepoint events

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     4b66ff46f2e18b1d32e18c881799ef911606f3be
Gitweb:        https://git.kernel.org/tip/4b66ff46f2e18b1d32e18c881799ef911606f3be
Author:        James Clark <james.clark@....com>
AuthorDate:    Wed, 12 Oct 2022 15:38:57 +01:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Thu, 27 Oct 2022 10:27:30 +02:00

perf: Fix missing raw data on tracepoint events

Since commit 838d9bb62d13 ("perf: Use sample_flags for raw_data")
raw data is not being output on tracepoints due to the PERF_SAMPLE_RAW
field not being set. Fix this by setting it for tracepoint events.

This fixes the following test failure:

  perf test "sched_switch" -vvv

   35: Track with sched_switch
  --- start ---
  test child forked, pid 1828
  ...
  Using CPUID 0x00000000410fd400
  sched_switch: cpu: 2 prev_tid -14687 next_tid 0
  sched_switch: cpu: 2 prev_tid -14687 next_tid 0
  Missing sched_switch events
  4613 events recorded
  test child finished with -1
  ---- end ----
  Track with sched_switch: FAILED!

Fixes: 838d9bb62d13 ("perf: Use sample_flags for raw_data")
Signed-off-by: James Clark <james.clark@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Tested-by: SeongJae Park <sj@...nel.org>
Tested-by: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20221012143857.48198-1-james.clark@arm.com
---
 kernel/events/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 01933db..4ec3717 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9846,6 +9846,7 @@ void perf_tp_event(u16 event_type, u64 count, void *record, int entry_size,
 
 	perf_sample_data_init(&data, 0, 0);
 	data.raw = &raw;
+	data.sample_flags |= PERF_SAMPLE_RAW;
 
 	perf_trace_buf_update(record, event_type);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ