UBIFS corruption after power cut - possibly unstable bits issue?

Artem Bityutskiy dedekind1 at gmail.com
Tue Nov 3 02:43:11 PST 2015


On Tue, 2015-11-03 at 11:06 +0100, Michal Suchanek wrote:
> it has been pointed out that this assumption on the part of UBI that
> erased pages are composed of 0xff bytes is just wrong.
> 
> Here it is wrong in the sense that the pages are not bit-perfect but
> there are other reasons why it may go wrong.
> 
> - if the nand controller uses randomization layer the pages are 0xff
> bytes transformed by the randomization layer
> 
> - if MTD grows full-disk encryption then reading a page of 0xff bytes
> will yield what this page decrypts to using current encryption scheme
> 
> The layering is wrong here. The MTD core should provide a function to
> check if a physical page is empty and the driver should provide
> driver-specific implementation if needed.

Yes, this was discussed, and the missing part is patches. The reason I
am replying to you is that I find the wording you are using to be
inaccurate.

The assumptions were not wrong when this stuff was designed,
implemented, tested and used in production. And for that hardware they
are not wrong.

Nowadays the situation is different, the HW is different. It is not the
same as the HW UBIFS was implemented and tested for. UBIFS needs to be
adjusted in order to support that hardware. "Wrong wrong wrong" is
incorrect wording, please do not use it. Please, use "needs more work",
"needs extending", "needs to support bit-flips in empty space", etc.

And layering is not wrong. We do not implement useless MTD methods for
something which does not exist in the Linux kernel. Please, introduce
the encryption support, introduce that driver with that method, and
then refactor the code. Please, do not use word "wrong", because it is
not the correct word for this situation, and it is unnecessarily
negative.

Thank you!



More information about the linux-mtd mailing list