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, 31 Mar 2010 16:34:59 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	Ingo Molnar <mingo@...e.hu>, James Morris <jmorris@...ei.org>,
	linux-kernel@...r.kernel.org, airlied@...ux.ie
Subject: Re: Config NO_BOOTMEM breaks my amd64 box

On 03/31/2010 03:47 PM, Yinghai Lu wrote:
>>
>> Well and that whole #ifdeffery is disgusting as well - even if the goal was to 
>> remove CONFIG_NO_BOOTMEM ASAP.
>>
>> Please learn to use proper intermediate helper functions and at minimum put 
>> the conversion ugliness somewhere that doesnt intrude our daily flow in .c 
>> files. The best rule is to _never ever_ put an #ifdef construct into a .c 
>> file. It doesnt matter what the goal if the #ifdef is - such ugliness in code 
>> is never justified.
> 
> if you agree that i can have one nobootmem.c in mm/
> 

That would be better, or more commonly, use inlines.

I'm still totally puzzled about this patch as well as the comment:

+#if defined(CONFIG_NO_BOOTMEM) && defined(MAX_NUMNODES)
+	/* In case some 32bit systems don't have RAM installed on node0 */
+        totalram_pages += free_all_memory_core_early(MAX_NUMNODES);
+#else
 	totalram_pages += free_all_bootmem();
+#endif


Why is that "32 bits" specific?  Second, MAX_NUMNODES is defined
whenever <linux/numa.h> is included, so what on Earth is this supposed
to signify?  Are you trying to say MAX_NUMNODES > 1?  Or are you trying
to say CONFIG_NUMA?

Furthermore, I really don't see the connection between this and James
Morris' reported problem, which he reports as "amd64", which presumably
is an x86-64 kernel and not 32 bits...  James, is that correct?  Any
more details you can give about the system?  I *really* don't want to go
into cargo cult programming mode, that would suck eggs no matter what.

	-hpa



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