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:	Mon, 1 Feb 2016 23:18:01 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Juri Lelli <juri.lelli@...il.com>,
	Clark Williams <williams@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH 4/4] sched: Add debugfs/sched/deadline_bw file to
 show current bandwidths

On Mon, Feb 01, 2016 at 03:26:28PM -0500, Steven Rostedt wrote:
> +static void *dl_next(struct seq_file *m, void *v, loff_t *pos)
> +{
> +	long cpu = (long)v;
> +
> +	/* to keep from returning zero, v is always cpu + 1 */
> +	cpu--;
> +	cpu = cpumask_next(cpu, cpu_possible_mask);
> +
> +	(*pos)++;
> +
> +	if (cpu >= num_possible_cpus())

And that wants to be: nr_cpu_ids, imagine the bitmap having holes in.

> +		cpu = 0;
> +	else
> +		cpu++;
> +
> +	return (void *)cpu;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ