public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] cmd_nand: add nand write.ubi command
Date: Fri, 29 Apr 2011 13:52:10 +0200	[thread overview]
Message-ID: <m2hb9h5l79.fsf@ohwell.denx.de> (raw)
In-Reply-To: <37c0540a80871c9cc9faa9bc8c2d142f104d1ac7.1304026883.git.bengardiner@nanometrics.ca> (Ben Gardiner's message of "Thu, 28 Apr 2011 17:47:54 -0400")

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

  reply	other threads:[~2011-04-29 11:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 21:47 [U-Boot] [PATCH 0/5] introduce nand write.ubi, and drop ffs for jffs2 too Ben Gardiner
2011-04-28 21:47 ` [U-Boot] [PATCH 1/5] nand_base: trivial: fix comment read/write comment Ben Gardiner
2011-04-28 21:47 ` [U-Boot] [PATCH 2/5] nand_util: convert nand_write_skip_bad() to flags Ben Gardiner
2011-04-29 11:44   ` Detlev Zundel
2011-04-28 21:47 ` [U-Boot] [PATCH 3/5] nand_util: drop trailing all-0xff pages if requested Ben Gardiner
2011-04-28 21:47 ` [U-Boot] [PATCH 4/5] cmd_nand: add nand write.ubi command Ben Gardiner
2011-04-29 11:52   ` Detlev Zundel [this message]
2011-04-28 21:47 ` [U-Boot] [PATCH 5/5] cmd_nand: also drop 0xff pages for jffs2 Ben Gardiner
2011-04-29 11:58 ` [U-Boot] [PATCH 0/5] introduce nand write.ubi, and drop ffs for jffs2 too Detlev Zundel
2011-04-29 13:59   ` Artem Bityutskiy
2011-05-02 13:14     ` Detlev Zundel
2011-05-11 21:04       ` Ben Gardiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2hb9h5l79.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox