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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Nov 2018 11:33:07 +0000
From:   "Sverdlin, Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@...ia.com>
To:     "Tudor.Ambarus@...rochip.com" <Tudor.Ambarus@...rochip.com>,
        "marek.vasut@...il.com" <marek.vasut@...il.com>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>,
        "computersforpeace@...il.com" <computersforpeace@...il.com>,
        "boris.brezillon@...tlin.com" <boris.brezillon@...tlin.com>,
        "richard@....at" <richard@....at>
CC:     "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mtd: spi-nor: fix erase_type array to indicate current
 map conf

Hello Tudor,

On 23/11/2018 11:32, Tudor.Ambarus@...rochip.com wrote:
>> I've tested this patch and it fixes the erasesize for S25FS128S and
>> our 128k partitions are writeable again with this patch.
> Good. You said that the flash is configured in non-uniform mapping (hybrid
> sector option). There is no uniform erase type that can erase the entire
> flash memory by its own, so the erase should be done using the non-uniform
> erase code (spi_nor_has_uniform_erase() should return false). Does the
> non-uniform erase work as expected? 

unfortunately, it doesn't. I was too fast reporting the success...
So erasesize is back to the value before non-uniform support patches,
partitions are not made read only any more, but actual write or
erase still fails.

I'll investigate further.

Taking into account the comments from Boris, we probably need this patch
anyway.

> For example, if the hybrid section is at the top of the address space, when
> using mtd_utils:
> $ mtd_debug erase /dev/your_mtd 4096 126976
> I would expect the use of the following erase types: 7*4k, 32k, 64k
> Then write and read back to check if the erase was done correctly:
> $ dd if=/dev/urandom of=in bs=4096 count=31
> $ mtd_debug write /dev/your_mtd 4096 126976 in
> $ mtd_debug read /dev/your_mtd 4096 126976 out
> $ sha1sum in out
> the output should be the same.
> 
> Feel free to add some prints in the code to be sure that non-uniform erase code
> selects the correct erase types.
> 

-- 
Best regards,
Alexander Sverdlin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ