[U-Boot] [PATCH 4/5] cmd_nand: add nand write.ubi command

Detlev Zundel dzu at denx.de
Fri Apr 29 13:52:10 CEST 2011


Hi Ben,

> Add another nand write. variant, ubi. This command will request of
> nand_write_skip_bad() that all trailing all-0xff pages will be
> dropped from eraseblocks as they are written as-per the
> reccommended behaviour of the UBI FAQ.

If I understand the code correctly, then the assumption is that writing
FFs to an erased flash is essentially a no-op, right?  This is not
really UBI specific, so why don't we use a name like e.g. "trimffs" for
the new functionality?

Moreover now that I think about it, I can imagine a corner case where
the flash is not erased at positions where the image contains ffs.  As I
read your code, the ffs will silently be dropped and no error will be
generated, although the contents of the image will _not_ correpsond to
the contents in flash.

If this is right, then this has potential for great confusion.  Maybe we
should check that the flash is really erased at the positions
corresponding to ffs?

Cheers
  Detlev

-- 
It's bad  civic hygiene to build  technologies that could  someday be used to
facilitate a police state.  No matter what the eavesdroppers and censors say,
these systems put us all at greater risk. Communications systems that have no
inherent  eavesdropping capabilities are more  secure than systems with those
capabilities built in.                                      -- Bruce Schneier
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list