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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7chCQRKwFoQ5OOXzqMvu5t9HamS3z9DdgaDgqCjPiD8G2A@mail.gmail.com>
Date:   Wed, 12 Oct 2022 09:52:33 -0700
From:   Namhyung Kim <namhyung@...nel.org>
To:     James Clark <james.clark@....com>
Cc:     linux-perf-users <linux-perf-users@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH] perf: Fix missing raw data on tracepoint events

On Wed, Oct 12, 2022 at 7:39 AM James Clark <james.clark@....com> wrote:
>
> 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")
> Cc: Peter Zijlstra (Intel) <peterz@...radead.org>
> Signed-off-by: James Clark <james.clark@....com>

Ouch.. thanks for the fix.

Acked-by: Namhyung Kim <namhyung@...nel.org>

Thanks,
Namhyung


> ---
>  kernel/events/core.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index b981b879bcd8..824c23830272 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -9759,6 +9759,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);
>
> --
> 2.28.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ