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] [day] [month] [year] [list]
Message-ID: <aDdXZJrPSJlCAcTs@google.com>
Date: Wed, 28 May 2025 11:35:16 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ravi Bangoria <ravi.bangoria@....com>, 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
Subject: Re: [PATCH v2] perf test: Add AMD IBS sw filter test

On Tue, May 27, 2025 at 05:51:21PM -0300, Arnaldo Carvalho de Melo wrote:
> On Sat, May 24, 2025 at 03:17:13PM +0530, Ravi Bangoria wrote:
> > Hi Namhyung,
> > 
> > On 24-May-25 5:57 AM, Namhyung Kim wrote:
> > > The kernel v6.14 added 'swfilt' to support privilege filtering in
> > > software so that IBS can be used by regular users.  Add a test case in
> > > x86 to verify the behavior.
> > > 
> > >   $ sudo perf test -vv 'IBS software filter'
> > >   113: AMD IBS software filtering:
> > >   --- start ---
> > >   test child forked, pid 178826
> > >   check availability of IBS swfilt
> > >   run perf record with modifier and swfilt
> > >   [ perf record: Woken up 3 times to write data ]
> > >   [ perf record: Captured and wrote 0.000 MB /dev/null ]
> > >   [ perf record: Woken up 3 times to write data ]
> > >   [ perf record: Captured and wrote 0.000 MB /dev/null ]
> > >   [ perf record: Woken up 3 times to write data ]
> > >   [ perf record: Captured and wrote 0.000 MB /dev/null ]
> > >   [ perf record: Woken up 0 times to write data ]
> > >   [ perf record: Captured and wrote 0.000 MB /dev/null ]
> > >   check number of samples with swfilt
> > >   [ perf record: Woken up 3 times to write data ]
> > >   [ perf record: Captured and wrote 0.037 MB - ]
> > >   [ perf record: Woken up 3 times to write data ]
> > >   [ perf record: Captured and wrote 0.041 MB - ]
> > >   ---- end(0) ----
> > >   113: AMD IBS software filtering                                      : Ok
> > > 
> > > Cc: Ravi Bangoria <ravi.bangoria@....com>
> > > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > 
> > Reviewed-by: Ravi Bangoria <ravi.bangoria@....com>
> > 
> > A minor nit below ...
> > 
> > > +echo "check number of samples with swfilt"
> > > +
> > > +kernel_sample=$(perf record -e ibs_op/swfilt/u -o- true | perf script -i- -F misc | grep -c ^K)
> > 
> > "true" barely runs in userspace. So, many a times this "perf record"
> > generates no samples :)
> 
> Right, something else, maybe one of those workloads:
> 
> acme@...ber:~/git/perf-tools-next$ perf test --list-workloads
> noploop
> thloop
> leafloop
> sqrtloop
> brstack
> datasym
> landlock
> acme@...ber:~/git/perf-tools-next$
> 
> root@...ber:~# time perf record -e ibs_op/swfilt/u perf test -w sqrtloop
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.160 MB perf.data (3976 samples) ]
> 
> real	0m1.588s
> user	0m1.407s
> sys	0m0.161s
> root@...ber:~# perf script | wc -l
> 3976
> root@...ber:~#
> 
> But I'm applying the patch as is, we can replace the workload later.

Thanks, I can add some workload to create both kernel and user traffic.
I think the current workloads run in user space mostly.

Thanks,
Namhyung


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ