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]
Date:   Tue, 21 Jul 2020 21:18:11 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Liang, Kan" <kan.liang@...ux.intel.com>
Cc:     acme@...hat.com, mingo@...nel.org, linux-kernel@...r.kernel.org,
        jolsa@...nel.org, eranian@...gle.com,
        alexander.shishkin@...ux.intel.com, ak@...ux.intel.com
Subject: Re: [PATCH V6 11/14] perf/x86/intel: Disable sample-read the slots
 and metrics events

On Tue, Jul 21, 2020 at 12:07:29PM -0400, Liang, Kan wrote:

> I'm trying to produce the bug mentioned above, but I'm not sure under what
> situation, the core code will 'promote' the sibling metric events?

Create an event group:

	fd = sys_perf_event_open();
	fd1 = sys_perf_event_open(.group_fd = fd);
	...

then kill the group leader:

	close(fd);

Then the sibling events: fdN, should get promoted. Ideally try and use
fd1 in a read or so after this.

> I tried the suggested code below. It works well for the sample-read case.
> Perf tool errors out as expected.

I'm not sure you can create that case with perf-tool, it's a bit of a
daft thing to do, so you'll have to write a custom program.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ