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: <aDYlyY2UbBxcMb9f@x1>
Date: Tue, 27 May 2025 17:51:21 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ravi Bangoria <ravi.bangoria@....com>
Cc: Namhyung Kim <namhyung@...nel.org>, 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 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.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ