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] [day] [month] [year] [list]
Date:	Tue, 28 Jul 2009 23:48:53 -0400
From:	Gregory Haskins <gregory.haskins@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	David Rientjes <rientjes@...gle.com>, linux-kernel@...r.kernel.org,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [regression] sched_getaffinity fails with EINVAL in 2.6.31-rc4

Rusty Russell wrote:
> On Tue, 28 Jul 2009 03:42:15 am David Rientjes wrote:
>> On Mon, 27 Jul 2009, Gregory Haskins wrote:
>>
>>> I am not sure when this started, but noticed that sched_getaffinity is
>>> not working in -rc4.
>>>
>>> [pid  6254] sched_getaffinity(0, 128, 0x7f80586b1fe0) = -1 EINVAL
>>> (Invalid argument)
>>>
>>> Here is a simple program for reproduction:
>>>
>>> #include <sched.h>
>>>
>>> int main(void)
>>> {
>>> 	cpu_set_t mask;
>>> 	int ret;
>>>
>>> 	ret = sched_getaffinity(0, sizeof(mask), &mask);
>>> 	if (ret < 0)
>>> 		perror("getaffinity");
>>>
>>> 	return ret;
>>> }
>>>
>>> If I get time, I will bisect this later today.
>>>
>> It's most likely due to the cpumask changes.  I don't know what cpu_set_t 
>> is, but it's probably smaller than CONFIG_NR_CPUS rounded up to a multiple 
>> of sizeof(long).
> 
> It's simply that you finally ran this on a kernel which had
> CONFIG_NR_CPUS > 1024.

Indeed.  I thought I had replied to the list that I figured that out,
but I think it might have been a trimmed list from someone elses reply.

Long story short, MAXSMP=y crept in, which set NR_CPUS=4096.  Backing
this off < 1024 indeed fixes the issue.

Thanks to all who replied!
-Greg


Download attachment "signature.asc" of type "application/pgp-signature" (268 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ