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, 31 Mar 2015 09:16:17 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, acme@...hat.com, mingo@...e.hu,
	ak@...ux.intel.com, jolsa@...hat.com, namhyung@...nel.org,
	cel@...ibm.com, sukadev@...ux.vnet.ibm.com, sonnyrao@...omium.org,
	johnmccutchan@...gle.com, dsahern@...il.com,
	adrian.hunter@...el.com, pawel.moll@....com
Subject: Re: [PATCH v6 1/4] perf,record: Add clockid parameter

On Tue, Mar 31, 2015 at 12:19:31AM +0200, Stephane Eranian wrote:

You seem to have misplaced the hunk that goes with the

fallback_missing_features:

label.

> @@ -1122,6 +1132,16 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
>  				goto try_fallback;
>  			}
>  			set_rlimit = NO_CHANGE;
> +
> +			/*
> +			 * If we succeeded but had to kill clockid, fail and
> +			 * have perf_evsel__open_strerror() print us a nice
> +			 * error.
> +			 */
> +			if (perf_missing_features.clockid) {
> +				err = -EINVAL;
> +				goto out_close;
> +			}
>  		}
>  	}
>  
> @@ -1155,7 +1175,10 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
>  	if (err != -EINVAL || cpu > 0 || thread > 0)
>  		goto out_close;
>  
> -	if (!perf_missing_features.cloexec && (flags & PERF_FLAG_FD_CLOEXEC)) {
> +	if (!perf_missing_features.clockid && evsel->attr.use_clockid) {
> +		perf_missing_features.clockid = true;
> +		goto fallback_missing_features;
> +	} else if (!perf_missing_features.cloexec && (flags & PERF_FLAG_FD_CLOEXEC)) {
>  		perf_missing_features.cloexec = true;
>  		goto fallback_missing_features;
>  	} else if (!perf_missing_features.mmap2 && evsel->attr.mmap2) {
> @@ -2080,6 +2103,8 @@ int perf_evsel__fprintf(struct perf_evsel *evsel,
>  		if_print(wakeup_events);
>  		if_print(bp_type);
>  		if_print(branch_sample_type);
> +		if_print(clockid);
> +
>  	}
>  out:
>  	fputc('\n', fp);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ