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:	Sat, 28 Feb 2015 23:57:51 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-kernel@...r.kernel.org,
	Adrian Hunter <adrian.hunter@...el.com>,
	Andi Kleen <ak@...ux.intel.com>, Borislav Petkov <bp@...e.de>,
	David Ahern <david.ahern@...cle.com>,
	He Kuang <hekuang@...wei.com>,
	Hemant Kumar <hemant@...ux.vnet.ibm.com>,
	Kan Liang <kan.liang@...el.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Naohiro Aota <naota@...sp.net>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Wang Nan <wangnan0@...wei.com>,
	Yunlong Song <yunlong.song@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH] perf tools: Fix pthread_attr_setaffinity_np() feature
 detection on Ubuntu systems

On Sat, Feb 28, 2015 at 08:49:27AM +0100, Ingo Molnar wrote:

SNIP

> 
>   0695e57b9a6a perf tools: Factor features display code
> 
> Firstly, 'factor' isn't a verb we use for code, 'factor out' is. But 
> it's not really factoring out - it separates the code. Did this title 
> want to say:
> 
>    perf tools: Separate feature display code into three parts
> 
> ? The title was absolutely unreadable.
> 
> Then it introduces two new makefile variables: LIB_FEATURE_TESTS and 
> VF_FEATURE_TESTS. LIB_FEATURE_TESTS is reasonably self-explanatory, 
> but wth is VF_FEATURE_TESTS?
> 
> More importantly, why isn't there a _single_ comment explaining their 
> use in the Makefile - _especially_ since CORE_FEATURE_TESTS is 
> explained so well, it's not like a bad example had to be followed.
> 
> Using cryptic abbreviations like 'VF' adds insult to injury. It took 
> me some time to figure out that it probably means 'Verbose Features'.
> 
> New feature detection adds to all these variables so people will just 
> guess to which to add and why.
> 
> Guys, this particular change was rushed and not explained well enough, 
> and it made debugging from that point on harder. Please slow down a 
> bit.

agreed, sry about that.. I'll try to clean it up while moving
features detection into tools/ as you suggested before

> 
> </rant>
> 

SNIP

> diff --git a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> index 0a0d3ecb4e8a..85ab83e6a42f 100644
> --- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> +++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> @@ -5,10 +5,12 @@ int main(void)
>  {
>  	int ret = 0;
>  	pthread_attr_t thread_attr;
> +	cpu_set_t cpu_mask;
>  
>  	pthread_attr_init(&thread_attr);
> -	/* don't care abt exact args, just the API itself in libpthread */
> -	ret = pthread_attr_setaffinity_np(&thread_attr, 0, NULL);
> +	CPU_ZERO(&cpu_mask);
> +
> +	ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_mask), &cpu_mask);

I think Arnaldo got this one covered in perf/urgent already,
but I might have missed something..

jirka
--
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