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]
Message-ID: <520C4D24.40701@cn.fujitsu.com>
Date:	Thu, 15 Aug 2013 11:38:12 +0800
From:	Tang Chen <tangchen@...fujitsu.com>
To:	Tejun Heo <tj@...nel.org>
CC:	mingo@...hat.com, hpa@...or.com, akpm@...ux-foundation.org,
	liwanp@...ux.vnet.ibm.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] memblock cleanup: Remove unnecessary check in memblock_find_in_range_node()

On 08/15/2013 11:27 AM, Tejun Heo wrote:
> Hello, Tang.
>
> On Thu, Aug 15, 2013 at 11:23:19AM +0800, Tang Chen wrote:
>> Furthermore, we don't need to check "if (this_end<  size)" actually. Without
>> this confusing check, we only waste some loops. So this patch removes the
>> check.
>>
>> Signed-off-by: Tang Chen<tangchen@...fujitsu.com>
>> ---
>>   mm/memblock.c |    3 ---
>>   1 files changed, 0 insertions(+), 3 deletions(-)
>>
>> diff --git a/mm/memblock.c b/mm/memblock.c
>> index a847bfe..e0c626e 100644
>> --- a/mm/memblock.c
>> +++ b/mm/memblock.c
>> @@ -114,9 +114,6 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start,
>>   		this_start = clamp(this_start, start, end);
>>   		this_end = clamp(this_end, start, end);
>>
>> -		if (this_end<  size)
>> -			continue;
>> -
>>   		cand = round_down(this_end - size, align);
>>   		if (cand>= this_start)
>>   			return cand;
>
> Hmmm... maybe I'm missing something but are you sure?  "this_end -
> size" can underflow and "cand>= this_start" will be true incorrectly.
>

Oh, you are right... Please ignore this. I didn't read it carefully.

Thanks.

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