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]
Date:	Fri, 13 Dec 2013 19:52:42 -0500
From:	Santosh Shilimkar <santosh.shilimkar@...com>
To:	Tejun Heo <tj@...nel.org>
CC:	<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	Yinghai Lu <yinghai@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Grygorii Strashko <grygorii.strashko@...com>
Subject: Re: [PATCH v3 08/23] mm/memblock: Add memblock memory allocation
 apis

On Friday 13 December 2013 04:37 PM, Tejun Heo wrote:
> On Mon, Dec 09, 2013 at 04:50:41PM -0500, Santosh Shilimkar wrote:
>> Introduce memblock memory allocation APIs which allow to support
>> PAE or LPAE extension on 32 bits archs where the physical memory
>> start address can be beyond 4GB. In such cases, existing bootmem
>> APIs which operate on 32 bit addresses won't work and needs
>> memblock layer which operates on 64 bit addresses.
> 
> The overall API looks good to me.  Thanks for doing this!
> 
>> +static void * __init memblock_virt_alloc_internal(
>> +				phys_addr_t size, phys_addr_t align,
>> +				phys_addr_t min_addr, phys_addr_t max_addr,
>> +				int nid)
>> +{
>> +	phys_addr_t alloc;
>> +	void *ptr;
>> +
>> +	if (nid == MAX_NUMNODES)
>> +		pr_warn("%s: usage of MAX_NUMNODES is depricated. Use NUMA_NO_NODE\n",
>> +			__func__);
> 
> Why not use WARN_ONCE()?  Also, shouldn't nid be set to NUMA_NO_NODE
> here?
> 
You want all the users using MAX_NUMNODES to know about it so that
the wrong usage can be fixed. WARN_ONCE will hide that.

> ...
>> +	if (nid != NUMA_NO_NODE) {
> 
> Otherwise, the above test is broken.
> 
So the idea was just to warn the users and allow them to fix
the code. Well we are just allowing the existing users of using
either MAX_NUMNODES or NUMA_NO_NODE continue to work. Thats what
we discussed, right ?

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