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: <20171213214628.1e1c1431@bbrezillon>
Date:   Wed, 13 Dec 2017 21:46:28 +0100
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Colin Ian King <colin.king@...onical.com>
Cc:     Richard Weinberger <richard@....at>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        linux-mtd@...ts.infradead.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH][mtd-next] mtd: nand: remove redundant check of len

On Wed, 13 Dec 2017 21:38:44 +0100
Boris Brezillon <boris.brezillon@...e-electrons.com> wrote:

> On Wed, 13 Dec 2017 20:30:04 +0000
> Colin Ian King <colin.king@...onical.com> wrote:
> 
> > On 13/12/17 20:24, Boris Brezillon wrote:  
> > > On Wed, 13 Dec 2017 20:17:43 +0000
> > > Colin King <colin.king@...onical.com> wrote:
> > >     
> > >> From: Colin Ian King <colin.king@...onical.com>
> > >>
> > >> The check of len being zero is redundant as it has already been
> > >> sanity checked for this value at the start of the function. Hence
> > >> it is impossible for this test to be true and so the redundant
> > >> code can be removed.    
> > > 
> > > Nope, it's not the same test, the initial test is
> > > 
> > > 	if (len && !buf)    
> > 
> > Ah, the current tip from linux-next has:
> > 
> > 1912        if (!len || !buf)
> > 1913                return -EINVAL;
> > 
> > ..so I guess that's why it got picked up by static analysis.  
> 
> Hm, that's weird, that's not what I see [1] in linux-next.

This being said, the test in nand_readid_op() is wrong [1], so maybe
this was the thing you were trying to fix.

No need to send a new patch, I'll squash the fix in the commit
introducing the function.

Thanks,

Boris

[1]http://code.bulix.org/kxivhd-240572

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ