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: <CALJ9ZPPyLP3xYtaoJ9+j1o_CMhMCA0tbd2xhh6CbeidDqW0s6Q@mail.gmail.com>
Date: Wed, 15 May 2024 10:39:01 -0700
From: Yabin Cui <yabinc@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, 
	Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>, 
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org, 
	bpf@...r.kernel.org
Subject: Re: [PATCH v4 1/3] perf/core: Save raw sample data conditionally
 based on sample type

Good suggestion! I will send a new version.



On Wed, May 15, 2024 at 1:58 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Fri, May 10, 2024 at 12:14:21PM -0700, Yabin Cui wrote:
>
> > diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> > index d2a15c0c6f8a..9fc55193ff99 100644
> > --- a/include/linux/perf_event.h
> > +++ b/include/linux/perf_event.h
> > @@ -1240,12 +1240,16 @@ static inline void perf_sample_save_callchain(struct perf_sample_data *data,
> >  }
> >
> >  static inline void perf_sample_save_raw_data(struct perf_sample_data *data,
> > +                                          struct perf_event *event,
> >                                            struct perf_raw_record *raw)
> >  {
> >       struct perf_raw_frag *frag = &raw->frag;
> >       u32 sum = 0;
> >       int size;
> >
> > +     if (!(event->attr.sample_type & PERF_SAMPLE_RAW))
> > +             return;
> > +
>
> Should we add something like:
>
>         if (WARN_ON_ONCE(data->sample_flags & PERF_SAMPLE_RAW))
>                 return;
>
> ? And I suppose the same for all these other patches.
>
> >       do {
> >               sum += frag->size;
> >               if (perf_raw_frag_last(frag))
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ