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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <488E1C75.7060808@sgi.com>
Date:	Mon, 28 Jul 2008 12:22:29 -0700
From:	Mike Travis <travis@....com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Al Viro <viro@...IV.linux.org.uk>
Subject: Re: [git pull] cpus4096 fixes

Ingo Molnar wrote:
> * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> 
>>
>> On Mon, 28 Jul 2008, Linus Torvalds wrote:
>>> Here's a trivial setup, that is even tested. It's _small_ too.
>>>
>>> 	/* cpu_bit_bitmap[0] is empty - so we can back into it */
>>> 	#define MASK_DECLARE_1(x) [x+1][0] = 1ul << (x)
>>> 	#define MASK_DECLARE_2(x) MASK_DECLARE_1(x), MASK_DECLARE_1(x+1)
>>> 	#define MASK_DECLARE_4(x) MASK_DECLARE_2(x), MASK_DECLARE_2(x+2)
>>> 	#define MASK_DECLARE_8(x) MASK_DECLARE_4(x), MASK_DECLARE_4(x+4)
>>>
>>> 	static const unsigned long cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)] = {
>>> 		MASK_DECLARE_8(0), MASK_DECLARE_8(8),
>>> 		MASK_DECLARE_8(16), MASK_DECLARE_8(24),
>>> 	#if BITS_PER_LONG > 32
>>> 		MASK_DECLARE_8(32), MASK_DECLARE_8(40),
>>> 		MASK_DECLARE_8(48), MASK_DECLARE_8(56),
>>> 	#endif
>>> 	};
>>>
>>> 	static inline const cpumask_t *get_cpu_mask(unsigned int nr)
>>> 	{
>>> 		const unsigned long *p = cpu_bit_bitmap[1 + nr % BITS_PER_LONG];
>>> 		p -= nr / BITS_PER_LONG;
>>> 		return (const cpumask_t *)p;
>>> 	}
>> Btw, Ingo, can we get this issue resolved asap, please?
>>
>> I was planning on doing -rc1 today, but this kind of hangs over me. 
>> The above three lines of code (and more lines of macro initializers) 
>> obviously does need some more testing, but if you hook it into the 
>> other changes you already had, maybe we can get it done.
>>
>> Hmm?
> 
> yeah, i'm on it. If everything goes well hopefully i'll have something 
> pullable in 1-2 hours, if that's ok as a timeframe.
> 
> 	Ingo

One problem is that the current api is cpumask_t cpumask_of_cpu(x), so
all ref's would have to be changed.  (Unless there's some clever way of
defining "&cpumask_of_cpu(x)" to be get_cpu_mask(x) ...?)

Do you want me to do these changes?

Thanks,
Mike
--
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