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: <550e7e9f-19cb-0b1f-fd3e-f0d958b4e75b@linux.ibm.com>
Date:   Thu, 28 Jul 2022 14:20:41 +0200
From:   Thomas Richter <tmricht@...ux.ibm.com>
To:     German Gomez <german.gomez@....com>, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org, acme@...nel.org,
        james.clark@....com
Cc:     svens@...ux.ibm.com, gor@...ux.ibm.com, sumanthk@...ux.ibm.com,
        hca@...ux.ibm.com, Namhyung Kim <namhyung@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH] perf/tests: Fix test case 95 on s390 and use same event

On 7/28/22 11:25, German Gomez wrote:
> Thanks for the fix, Thomas
> 
> On 27/07/2022 15:14, Thomas Richter wrote:
>> On linux-next tree perf test 95 was added recently.
>> s390 does not support branch sampling at all and the test case fails
>> despite for checking branch support before hand.
>> The check for support of branching
>> uses the software event named dummy, as seen in the line:
>>
>>  perf record -b -o- -e dummy -B true > /dev/null 2>&1 || exit 2
> 
> Just curious, do you know why the command succeeds in this platform (and
> potentially others)?
> 
> I got the idea of using "dummy" from [1] but only tested on arm64 and
> x86. I thought the platforms would reject it if -b was not implemented
> regardless of the event. Did I misunderstand the use of dummy?
> 
> Thanks,
> German
> 
> [1] https://lore.kernel.org/all/20220617073840.GA45710@leoy-ThinkPad-X240s/
> 

Well, dummy is a predefined event of type software, you see that when you add
some -v options as in 
# perf record -e dummy -vvv
DEBUGINFOD_URLS=
Using CPUID IBM,3931,704,A01,3.7,002f
nr_cblocks: 0
affinity: SYS
mmap flush: 1
comp level: 0
------------------------------------------------------------
perf_event_attr:
  type                             1      <----------- type 1 is software
  size                             128
  config                           0x9
  { sample_period, sample_freq }   4000


So this event is never sent to an hardware PMU (which would have type 0) and thus
mostly succeeds where as the perf record command without event uses default
event cycles. And that one is sent to hardware PMU on s390...

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ