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:	Wed, 12 May 2010 09:52:18 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	kosaki.motohiro@...fujitsu.com,
	Rusty Russell <rusty@...tcorp.com.au>,
	linux-kernel@...r.kernel.org, stable@...nel.org,
	Andi Kleen <andi@...stfloor.org>,
	Ken Werner <ken.werner@....de>
Subject: Re: cpumask: fix compat getaffinity

> On Tuesday 11 May 2010, Rusty Russell wrote:
> > cpumask: use nr_cpu_ids for printing and parsing cpumasks
> > 
> > Commit a45185d2d "cpumask: convert kernel/compat.c" broke
> > libnuma, which abuses sched_getaffinity to find out NR_CPUS
> > in order to parse /sys/devices/system/node/node*/cpumap.
> > 
> > However, the result now returned reflects nr_cpu_ids, and
> > cpumask_scnprintf et al. use nr_cpumask_bits which is NR_CPUS (for
> > CONFIG_CPUMASK_OFFSTACK=n) or nr_cpu_ids (for
> > CONFIG_CPUMASK_OFFSTACK=y).
> > 
> > We should use nr_cpu_ids consistently.
> > 
> > Reported-by: Arnd Bergmann <arnd@...db.de>
> > Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
> > Cc: stable@...nel.org
> 
> It looks like this changes fixes the compat case, but now
> the native system call would be inconsistent with the
> sysfs output. 
> 
> Wouldn't you also need something like the change below
> to make the return value of sched_getaffinity() independent
> of NR_CPUS?
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Looks good. but please rebase it on latest linus-tree. in linus tree,
we are already using nr_cpu_ids instead NR_CPUS.

And I'm sorry. at making such change, I've forgot to care compat
syscall, your patch fixes it ;)



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