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:   Fri, 17 Feb 2017 16:05:52 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jan Stancek <jstancek@...hat.com>
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        mingo@...hat.com, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        mhiramat@...nel.org
Subject: Re: [PATCH v3 3/3] perf: replace _SC_NPROCESSORS_CONF with
 max_present_cpu in cpu_topology_map

On Fri, Feb 17, 2017 at 12:10:26PM +0100, Jan Stancek wrote:

SNIP

> -	int cpu_nr = ph->env.nr_cpus_online;
> +	int cpu_nr = ph->env.nr_cpus_avail;
>  
>  	nr = ph->env.nr_sibling_cores;
>  	str = ph->env.sibling_cores;
> @@ -1792,7 +1786,7 @@ static int process_cpu_topology(struct perf_file_section *section,
>  	u32 nr, i;
>  	char *str;
>  	struct strbuf sb;
> -	int cpu_nr = ph->env.nr_cpus_online;
> +	int cpu_nr = ph->env.nr_cpus_avail;
>  	u64 size = 0;
>  
>  	ph->env.cpu = calloc(cpu_nr, sizeof(*ph->env.cpu));
> @@ -1873,7 +1867,7 @@ static int process_cpu_topology(struct perf_file_section *section,
>  		if (ph->needs_swap)
>  			nr = bswap_32(nr);
>  
> -		if (nr > (u32)cpu_nr) {
> +		if (nr != (u32)-1 && nr > (u32)cpu_nr) {

could you please add a comment here exaplaining the reason
for possible -1 in here.. other than that it's ok,

for the series:

Acked-by: Jiri Olsa <jolsa@...nel.org>

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ