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:	Thu, 24 Jul 2008 10:15:10 -0700
From:	Mike Travis <travis@....com>
To:	Bert Wesarg <bert.wesarg@...glemail.com>
CC:	Ingo Molnar <mingo@...e.hu>, Rusty Russell <rusty@...tcorp.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>, Jack Steiner <steiner@....com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Len Brown <len.brown@...el.com>,
	Lennert Buytenhek <kernel@...tstofly.org>,
	Dave Jones <davej@...emonkey.org.uk>,
	Paul Jackson <pj@....com>, Tony Luck <tony.luck@...el.com>,
	Tigran Aivazian <tigran@...azian.fsnet.co.uk>,
	Paul Mackerras <paulus@...ba.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Robert Richter <robert.richter@....com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Sam Creasey <sammy@...my.net>, Greg Banks <gnb@....com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Adrian Bunk <bunk@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andreas Schwab <schwab@...e.de>,
	Johannes Weiner <hannes@...urebad.de>
Subject: Re: [PATCH 1/1] cpumask: Change cpumask_of_cpu to use cpumask_of_cpu_map

Bert Wesarg wrote:
> Hi,
> 
> On Wed, Jul 23, 2008 at 19:18, Mike Travis <travis@....com> wrote:
>> --- linux-2.6.tip.orig/arch/x86/kernel/setup_percpu.c
>> +++ linux-2.6.tip/arch/x86/kernel/setup_percpu.c
>> @@ -80,8 +80,15 @@ static void __init setup_per_cpu_maps(vo
>>  #endif
>>  }
>>
>> -#ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP
>> -cpumask_t *cpumask_of_cpu_map __read_mostly;
>> +#ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP_PTR
>> +/*
>> + * Configure an initial cpumask_of_cpu(0) for early users
>> + */
>> +static cpumask_t initial_cpumask_of_cpu_map __initdata = (cpumask_t) { {
>> +       [BITS_TO_LONGS(NR_CPUS)-1] = 1
>> +} };
> This looks weird, first one missing {} pair, which may explain Ingo's
> build error.

Yes the compiler was pretty finicky, but it compiled with gcc-4.2.4.  I'll
try out some other versions.  But Rusty's different method of statically
initializing the array would replace the above anyways.

.... Second, why do you want to set the last unsigned long to
> one? Shouldn't this be the first?

The MSB of the cpumask is the highest numbered cpu, the LSB is the lowest.
(Caught me early on as well.)

Thanks,
Mike

> 
> Regards
> Bert
> 
> 
>> +cpumask_t *cpumask_of_cpu_map __read_mostly =
>> +       (cpumask_t *)&initial_cpumask_of_cpu_map;
>>  EXPORT_SYMBOL(cpumask_of_cpu_map);
>>

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