Re: [BUG+PATCH] binfmt_elf::create_elf_tables changes u_platform without refill

From: J.A. Magallon (jamagallon@able.es)
Date: Fri Dec 27 2002 - 19:14:43 EST


On 2002.12.28 J.A. Magallon wrote:
> Hi all...
>
[...]
> #if defined(__i386__) && defined(CONFIG_SMP)
> if(smp_num_siblings > 1)
> u_platform = u_platform - ((current->pid % 64) << 7);
> ///// So original u_platform with data is lost !!!
> #endif
> ...
[...]
>
> One question: why the 64 value ? Because linux supports 64 processors ?
> Why not just 2, because you have two siblings at most ?
>

Better, shouldn't this be NR_CPUS ? So you save half stack space on ia32,
or even more with CONFIG_NR_CPUS...

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.21-pre2-jam1 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Dec 31 2002 - 22:00:11 EST