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]
Message-ID: <CAGG-pUSfA7ynQM3OEFqHaac3vh3BooisGq2rKO5OmAE_cdKb9A@mail.gmail.com>
Date:	Sat, 19 Oct 2013 20:13:25 -0300
From:	Geyslan Gregório Bem <geyslan@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	kernel-br <kernel-br@...glegroups.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	"open list:CRYPTO API" <linux-crypto@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: n2_core: insert '!err' condition in else scope

2013/10/19 David Miller <davem@...emloft.net>:
> From: Geyslan Gregório Bem <geyslan@...il.com>
> Date: Sat, 19 Oct 2013 19:42:35 -0300
>
>> 2013/10/19 David Miller <davem@...emloft.net>:
>>> From: "Geyslan G. Bem" <geyslan@...il.com>
>>> Date: Sat, 19 Oct 2013 10:09:31 -0300
>>>
>>>> This patch moves the '!err' condition into the above else scope,
>>>> what is more obvious and has the secondary goal of avoid false-positives
>>>> in statical analyze tools.
>>>>
>>>> Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
>>>
>>> I do not think patches should be applied to satisfy tools if the
>>> code is semantically correct.
>>
>> Yes, Miller, I agree. But as I mentioned:
>> ".. and has as the 'secondary' goal of avoid false-positives in
>> statical analyze tools."
>>
>> The 'primary' goal is to not repeat a condition test:
>> "This patch moves the '!err' condition into the above else scope, what
>> is more obvious ..."
>
> I still do not feel that this change is a net-positive.  Sorry.
Miller,

I can understand you. You don't want to break your git history
(blame). But when a code is clearly more readable/understandable you
must assume that it has a huge net-positive.

The patch improves the code in three ways:
- Only one if/else;
- Not blame on static analysis tools.
- And avoid more discussion about that in the future (nobody will send
patches like this to disturb you about that part of code).

The decision is yours.

Thanks again.
--
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