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: <32ad6b65-c7fc-426c-84a6-203ccd964444@intel.com>
Date: Tue, 3 Sep 2024 21:41:33 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Leo Yan <leo.yan@....com>, Peter Zijlstra <peterz@...radead.org>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
 "Liang, Kan" <kan.liang@...ux.intel.com>,
 Suzuki K Poulose <suzuki.poulose@....com>, Mike Leach
 <mike.leach@...aro.org>, James Clark <james.clark@...aro.org>,
 John Garry <john.g.garry@...cle.com>, Will Deacon <will@...nel.org>,
 Yicong Yang <yangyicong@...ilicon.com>,
 Jonathan Cameron <jonathan.cameron@...wei.com>,
 linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, coresight@...ts.linaro.org
Subject: Re: [PATCH v6 6/8] perf auxtrace: Bails out after finding the event
 for the map index

On 23/08/24 14:33, Leo Yan wrote:
> After finding the corresponding event for the passed buffer index, it is
> safe to say the found event has been used. Then, the tool can check the
> event status and bails out if it has been disabled.

I don't really understand why this is a separate patch.  Maybe it
should be merged with the next one?

> 
> Signed-off-by: Leo Yan <leo.yan@....com>
> ---
>  tools/perf/util/auxtrace.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index e7b582d92811..2acf63efab1d 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -688,15 +688,15 @@ int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx)
>  		if (evsel__is_aux_event(evsel)) {
>  			int cpu_map_idx;
>  
> -			if (evsel->disabled)
> -				return 0;
> -
>  			cpu_map_idx = evlist__find_cpu_map_idx(itr->evlist,
>  							       evsel, idx);
>  			/* No map is found in per CPU mmap */
>  			if (cpu_map_idx == -ENOENT)
>  				return cpu_map_idx;
>  
> +			if (evsel->disabled)
> +				return 0;
> +
>  			if (cpu_map_idx >= 0)
>  				return evlist__enable_event_idx(evsel, 1, cpu_map_idx);
>  			else


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ