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: <ZqL-sv_CSTqNnu-N@google.com>
Date: Thu, 25 Jul 2024 18:41:06 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	linux-perf-users@...r.kernel.org, KP Singh <kpsingh@...nel.org>,
	Song Liu <song@...nel.org>, bpf@...r.kernel.org,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v3 1/8] perf bpf-filter: Make filters map a single entry
 hashmap

On Wed, Jul 24, 2024 at 06:39:34PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, Jul 24, 2024 at 01:20:27PM -0700, Namhyung Kim wrote:
> > On Wed, Jul 24, 2024 at 04:32:16PM -0300, Arnaldo Carvalho de Melo wrote:
> > > On Wed, Jul 03, 2024 at 03:30:28PM -0700, Namhyung Kim wrote:
> > > > And the value is now an array.  This is to support multiple filter
> > > > entries in the map later.
> > > > 
> > > > No functional changes intended.
> > > 
> > > Hey how can we test this feature these days?
> > 
> > There's a 'perf record sample filtering (by BPF) tests'.
> > 
> >   $ ./perf test -vv filtering
> >    95: perf record sample filtering (by BPF) tests:
> >   --- start ---
> >   test child forked, pid 1042594
> >   Checking BPF-filter privilege
> >   try 'sudo perf record --setup-filter pin' first.
> >   bpf-filter test [Skipped permission]
> >   ---- end(-2) ----
> >    95: perf record sample filtering (by BPF) tests                     : Skip
> > 
> > > 
> > > With this first patch applied:
> > > 
> > > root@...ber:~# perf record -a -W -e cycles:p --filter 'period > 100 || weight > 0' sleep 1
> > > Error: cpu_atom/cycles/p event does not have PERF_SAMPLE_WEIGHT
> > >  Hint: please add -W option to perf record
> > > failed to set filter "BPF" on event cpu_atom/cycles/p with 95 (Operation not supported)
> > > root@...ber:~# perf record -a -W -e cpu_core/cycles/p --filter 'period > 100 || weight > 0' sleep 1
> > > Error: cpu_core/cycles/p event does not have PERF_SAMPLE_WEIGHT
> > >  Hint: please add -W option to perf record
> > > failed to set filter "BPF" on event cpu_core/cycles/p with 95 (Operation not supported)
> > > root@...ber:~# perf record -a -W -e cpu_atom/cycles/p --filter 'period > 100 || weight > 0' sleep 1
> > > Error: cpu_atom/cycles/p event does not have PERF_SAMPLE_WEIGHT
> > >  Hint: please add -W option to perf record
> > > failed to set filter "BPF" on event cpu_atom/cycles/p with 95 (Operation not supported)
> > > root@...ber:~#
> > 
> > Do you say it's failing after the first patch?  It looks like the atom
> 
> yes
> 
> > CPU doesn't support PERF_SAMPLE_WEIGHT and should fail already.
> 
> I tried with 'cycles:p', 'cpu_atom/cycles/p' and with
> 'cpu_core/cycles/p', with and without -W (to use the warning advice)
> will try again tomorrow.

Let me know if you find anything.  Maybe it didn't set the flag in the
attr.  Can you run `perf record -W true && perf evlist -v` ?

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ