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] [day] [month] [year] [list]
Message-ID: <20180502123914.3755a634@bbrezillon>
Date:   Wed, 2 May 2018 12:39:14 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     "Wan, Jane (Nokia - US/Sunnyvale)" <jane.wan@...ia.com>
Cc:     Miquel Raynal <miquel.raynal@...tlin.com>,
        "shreeya.patel23498@...il.com" <shreeya.patel23498@...il.com>,
        "yamada.masahiro@...ionext.com" <yamada.masahiro@...ionext.com>,
        "richard@....at" <richard@....at>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "marek.vasut@...il.com" <marek.vasut@...il.com>,
        "Bos, Ties \(Nokia - US/Sunnyvale\)" <ties.bos@...ia.com>,
        "prabhakar.kushwaha@....com" <prabhakar.kushwaha@....com>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "jagdish.gediya@....com" <jagdish.gediya@....com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "computersforpeace@...il.com" <computersforpeace@...il.com>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>
Subject: Re: [PATCH 1/2] Fix FSL NAND driver to read all ONFI parameter
 pages

On Tue, 1 May 2018 05:01:23 +0000
"Wan, Jane (Nokia - US/Sunnyvale)" <jane.wan@...ia.com> wrote:

> Hi Miquèl and Boris,
> 
> Thank you for your response and feedback.  I've modified the fix based on your comments.  
> Please see the updated patch file at the end of this message (also in attachment).
> My answers to your comments/questions are inline in the previous message.
> 
> Here is the answer to Boris question in another email thread:
> 
> > What if some NANDs have 4 or more copies of the param page?  
>  [Jane] The ONFI spec defines that the parameter page and its two redundant copies are mandatory.  
> The additional redundant pages are optional.  Currently, the FSL NAND driver only reads the first 
> parameter page.  This patch is to fix the driver to meet the mandatory requirement in the spec. 
> We got a batch of particularly bad NAND chips recently and we needed these changes to make them 
> work reliably over temperature.  The patch was verified using these bad chips.

And that proves my point. The core is reading 3 param pages [1], but
since this driver was trying to guess how many bytes to read from
->cmdfunc() and did not guess correctly you ended up with a partially
working implementation (works only if the first PARAM page is valid).
Now, you fix it to read 3 PARAM pages, but what if we decide to read
more to cope with MLC NANDs where even more copy are needed to have one
valid version? You'll have to patch ->cmdfunc() again, just because
you're trying to guess something that the core is supposed to tell you.

[1]https://elixir.bootlin.com/linux/v4.17-rc3/source/drivers/mtd/nand/raw/nand_base.c#L5115

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ