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:	Sun, 18 Dec 2011 01:15:31 -0600
From:	Milton Miller <miltonm@....com>
To:	David Howells <dhowells@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix order_base_2(0)


David Howells wrote:
> Linus Torvalds <torvalds@...xxxxxxxxxxxxxxxxx> wrote:
> 
> > Does anybody actually *want* order_base_2(0)?
> 
> There aren't actually that many users:
..
 
> | arch/powerpc/platforms/pseries/iommu.c: len = order_base_2(max_addr);
> 
> Not sure. Doesn't look likely, but can memory_hotplug_max() be 0 if hotplug
> is not supported?

arch/powerpc/include/asm/mmzone.h has the declaration or #define, and
arch/powerpc/mm/numa.c has the definiton when not defined.   All have
memblock_end_of_DRAM() as the minimum value, so it will never be 0.

(The usage is to get the number of bits needed to cover all possible
memory that could be allocated to the OS to size the iommu table).

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