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:	Tue, 01 Dec 2009 14:35:34 +0800
From:	Cong Wang <amwang@...hat.com>
To:	Tejun Heo <tj@...nel.org>
CC:	Christoph Lameter <cl@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] percpu: explain quick paths in pcpu_[de]populate_chunk()

Tejun Heo wrote:
> Hello,
> 
> On 12/01/2009 02:40 PM, Cong Wang wrote:
>>> So, I don't know.  The first iteration only loop looks a bit unusual
>>> for sure but it isn't something conceptually convoluted.
>> Now this seems to be better. So with this change, we can do:
>>
>> pcpu_first_pop_region(chunk, rs, re, start, end);
>> if (rs < re && ...)
>>    return;
>>
>> Right?
> 
> Yeap, but is that any better?  Passing lvalue loop parameters to loop
> constructs is customary.  For almost all other cases, it's not, so
> 
>  pcpu_first_pop_region(chunk, &rs, &re, start, end)
> 
> would be better but then we have two similar looking interfaces which
> take different types of parameters.  Also, you probably can drop rs <
> re test there but for me it just seems easier to simply check the
> first iteration.  If you think it's something worth changing and it
> looks better afterwards, please send a patch.
> 

What do you think about the patch below? Untested.

-----------

Signed-off-by: WANG Cong <amwang@...hat.com>


View attachment "mm-percpu_c-remove-two-useless-break.diff" of type "text/plain" (1327 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ