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>] [day] [month] [year] [list]
Message-ID: <20170103143201.14fcf294@bbrezillon>
Date:   Tue, 3 Jan 2017 14:32:01 +0100
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Icenowy Zheng <icenowy@...c.xyz>
Cc:     Richard Weinberger <richard@....at>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Cyrille Pitchen <cyrille.pitchen@...el.com>,
        "Valdis.Kletnieks@...edu" <valdis.kletnieks@...edu>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 14/15] mtd: nand: hynix: rework NAND ID decoding to
 extract more information

On Tue, 03 Jan 2017 21:17:13 +0800
Icenowy Zheng <icenowy@...c.xyz> wrote:

> 03.01.2017, 21:01, "Boris Brezillon" <boris.brezillon@...e-electrons.com>:
> > The current NAND ID detection in nand_hynix.c is not handling the
> > different scheme used by Hynix, thus forcing developers to add new
> > entries in the nand_ids table each time they want to support a new MLC
> > NAND.
> >
> > Enhance the detection logic to handle all known formats. This does not
> > necessarily mean we are handling all the cases, but if new formats are
> > discovered, the code should evolve to take them into account instead of
> > adding more full-id entries in the nand_ids table.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
> > ---
> >  drivers/mtd/nand/nand_hynix.c | 228 ++++++++++++++++++++++++++++++++++++++----
> >  1 file changed, 209 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/nand_hynix.c b/drivers/mtd/nand/nand_hynix.c
> > index 06c8e8b0ec68..a35ca3a593f5 100644
> > --- a/drivers/mtd/nand/nand_hynix.c
> > +++ b/drivers/mtd/nand/nand_hynix.c
> > @@ -13,21 +13,56 @@
> >   */
> >

[...]

> > + switch (oobsize) {
> >                  case 0:
> >                          mtd->oobsize = 128;
> >                          break;
> > @@ -46,23 +81,178 @@ static void hynix_nand_decode_id(struct nand_chip *chip)
> >                  case 5:
> >                          mtd->oobsize = 16;
> >                          break;
> > - default:
> > + case 6:
> >                          mtd->oobsize = 640;
> >                          break;
> > + default:
> > + /*
> > + * We should never reach this case, but if that
> > + * happens, this probably means Samsung decided to use  
> 
> Is this "Samsung" a copy-n-paste error? ;-)

Indeed, and this is not the only place where I'm wrongly mentioning
Samsung. I'll fix that.

Thanks,

Boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ