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>] [day] [month] [year] [list]
Message-ID: <20190410111521.026c7010@xps13>
Date:   Wed, 10 Apr 2019 11:15:21 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     masonccyang@...c.com.tw
Cc:     bbrezillon@...nel.org,
        "Boris Brezillon" <boris.brezillon@...labora.com>,
        computersforpeace@...il.com, dwmw2@...radead.org,
        juliensu@...c.com.tw, linux-kernel@...r.kernel.org,
        linux-mtd@...ts.infradead.org, marek.vasut@...il.com,
        richard@....at, zhengxunli@...c.com.tw
Subject: Re: [PATCH] mtd: rawnand: Add Macronix NAND read retry and
 randomizer support

Hi masonccyang@...c.com.tw,

masonccyang@...c.com.tw wrote on Wed, 10 Apr 2019 16:40:25 +0800:

> Hi Miquel,
>  
> > > > 
> > > > Re: [PATCH] mtd: rawnand: Add Macronix NAND read retry and   
> randomizer 
> > > support  
> > > > 
> > > > On Tue, 9 Apr 2019 17:35:39 +0800
> > > > masonccyang@...c.com.tw wrote:
> > > >   
> > > > > > > +
> > > > > > > +static const struct kobj_attribute sysfs_mxic_nand =
> > > > > > > +   __ATTR(nand_random, S_IRUGO | S_IWUSR,
> > > > > > > +          mxic_nand_rand_type_show,
> > > > > > > +          mxic_nand_rand_type_store);   
> > > > > > 
> > > > > > No, we don't want to expose that through a sysfs file,   
> especially 
> > > since  
> > > > > > changing the randomizer config means making the NAND unreadable   
> for
> > > > > > those that have used it before the change.
> > > > > >   
> > > > > 
> > > > > Our on-die randomizer is still readable from user after the   
> function 
> > > > > is enabled.   
> > > > 
> > > > You mean the memory is still readable no matter the randomizer   
> state.
> > > > Not sure how that's possible, but okay.  
> > 
> > So if you write non-randomized data to the NAND chip, then enable the
> > randomizer en read back the data, all will be ok?  

s/en/and/

> 
> yes !

I don't understand how this is possible. Have you tried it yourself?

Can you explain how this is supposed to work?

> 
> > 
> > And if randomized data is written to the NAND chip and we disable the
> > randomizer, then the data will also be correct?
> >   
> 
> Enable randomizer is a OTP(One-Time-Program) bit and can't be erased 
> again!
> That means never disable it once it has been enabled.
> 
> > > >   
> > > > > This randomizer is just like a internal memory cell 
> > > > > reliability enhanced.   
> > > > 
> > > > Why don't you enable it by default then?   
> > > 
> > > The penalty of randomizer is read/write performance down.
> > > i.e,. tPROG 300 us to 340 us (randomizer enable)
> > > therefore, disable it by default.  
> > 
> > Is this info somewhere in the ONFI param page? I suppose once
> > randomization is enabled we should also tweak the timings and verify
> > that the controller supports it.  
> 
> yes, it is in ONFI param page@...e# 167 of bit 1 (Vendor Blocks 
> starting@...e# 164).
> 
> +#define ONFI_FEATURE_ADDR_MXIC_RANDOMIZER 0xB0
> +
> +struct nand_onfi_vendor_macronix {
> +                u8 reserved[1];
> +                u8 reliability_func;
> +} __packed;
> 
> 
> in addition, enable randomizer has no any impact on timing of tRC, tRP, 
> tWC and so on.
> host driver just need to check the status pin of RY/#BY as like standard
> read/write operation flow.
> 
> thanks & best regards,
> Mason
> 


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ