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: <68796741-f49f-447f-b707-fe4f8391fc17@intel.com>
Date: Thu, 11 Jul 2024 13:42:33 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Heiko Carstens <hca@...ux.ibm.com>, Thomas Richter <tmricht@...ux.ibm.com>,
 Hendrik Brueckner <brueckner@...ux.ibm.com>,
 Suzuki K Poulose <suzuki.poulose@....com>, Mike Leach
 <mike.leach@...aro.org>, James Clark <james.clark@....com>,
 coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
 Yicong Yang <yangyicong@...ilicon.com>,
 Jonathan Cameron <jonathan.cameron@...wei.com>, Will Deacon
 <will@...nel.org>, Arnaldo Carvalho de Melo <acme@...nel.org>,
 Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
 Ian Rogers <irogers@...gle.com>, Andi Kleen <ak@...ux.intel.com>,
 linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH V8 01/12] perf/core: Add aux_pause, aux_resume,
 aux_start_paused

On 1/07/24 13:26, Peter Zijlstra wrote:
> On Fri, Jun 28, 2024 at 09:51:00AM +0300, Adrian Hunter wrote:
> 
>> Add aux_paused to struct perf_event for AUX area events to keep track of
>> the "paused" state. aux_paused is initialized to aux_start_paused.
> 	
>> @@ -798,6 +810,9 @@ struct perf_event {
>>  	/* for aux_output events */
>>  	struct perf_event		*aux_event;
>>  
>> +	/* for AUX area events */
>> +	unsigned int			aux_paused;
>> +
>>  	void (*destroy)(struct perf_event *);
>>  	struct rcu_head			rcu_head;
>>  
> 
> Should this not be part of struct hw_perf_event for whatever hw event
> implements this AUX stuff?
> 
> In fact, I would expect PERF_HES_PAUSED or something to go in
> perf_event::hw::state.

Sorry for the slow reply due to vacation.

There doesn't seem to be anything preventing pause/resume from
"racing" (PMI vs task context) with changes in the aux event state,
so aux_paused must be separate from perf_event::hw::state.

But putting it in perf_event::hw should be fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ