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: <CAM9d7cigVWOQxGkWzTtHnP7f9Vg43gn1kxKK21NZ9FxhBAm1FQ@mail.gmail.com>
Date:   Fri, 13 Jan 2023 11:31:10 -0800
From:   Namhyung Kim <namhyung@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>, Song Liu <song@...nel.org>
Subject: Re: [PATCH 5/8] perf/core: Set data->sample_flags in perf_prepare_sample()

On Fri, Jan 13, 2023 at 3:20 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Thu, Jan 12, 2023 at 01:40:12PM -0800, Namhyung Kim wrote:
>
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -7053,6 +7053,14 @@ static void perf_aux_sample_output(struct perf_event *event,
> >       ring_buffer_put(rb);
> >  }
> >
> > +/*
> > + * A set of common sample data types saved even for non-sample records
> > + * when event->attr.sample_id_all is set.
> > + */
> > +#define PERF_SAMPLE_ID_ALL  (PERF_SAMPLE_TID | PERF_SAMPLE_TIME |    \
> > +                          PERF_SAMPLE_CPU | PERF_SAMPLE_ID |         \
> > +                          PERF_SAMPLE_IDENTIFIER | PERF_SAMPLE_STREAM_ID)
> > +
>
>
> >       __perf_event_header__init_id(header, data, event, filtered_sample_type);
> > +     data->sample_flags |= sample_type & PERF_SAMPLE_ID_ALL;
>
> Why not update __perf_event_header__init_id() ?

My concern was the non-sample records which don't check the sample
flags at all.  So I'd like to skip the write for them.

But that's not a big deal.  I can move it if you want.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ