public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Todd Poynor <tpoynor@mvista.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Supporting flash that powers up locked
Date: Wed, 24 Nov 2004 17:15:50 -0800	[thread overview]
Message-ID: <41A53246.7040704@mvista.com> (raw)
In-Reply-To: <1101304647.8191.9015.camel@hades.cambridge.redhat.com>

David Woodhouse wrote:
> We already have a bit to set in the partition flags to show that a
> partition should be read-only. 

Yeah I saw that the bit is really an amalgam of 
MTD_CLEAR_BITS|MTD_SET_BITS that are also involved in other capability 
combos (MTD_CAP_NANDFLASH, et al) and wasn't sure if there were other 
side effects of messing with those at runtime.

> I'd rather do this with a blacklist of the chips which lock themselves,
> and have the chip driver automatically unlock it at boot time and
> suspend time (or automatically as required).

I did receive some pushback when I previously tried to do something 
similar, since we'd often be unlocking bootloader firmware and such.

It may be better to err on the side of caution and make it the 
responsibility of userspace to unlock the needed portions.  Assuming the 
root fs is read-only then boot time probably isn't a problem.  System 
resume time could be a problem, since we can't guarantee nothing will 
write to previously-writeable filesystems before the "restore flash 
state" script runs.  So if the dangers of unlocking bootloaders etc. 
aren't felt to be that important then unlocking all blocks is the easier 
solution.

Another option suggested previously was to require userspace to unlock 
needed blocks, but keep a bitmap of unlocked blocks and restore the 
flash to the same state at mtd resume, so writeable file systems 
continue to be writeable at resume time (and no userspace callback is 
needed at resume time).

If, all in all, unlocking the whole chip is still the best way to go 
then I'll send a proposed patch for Intel K3 StrataFlash.  Thanks,


-- 
Todd

  reply	other threads:[~2004-11-25  1:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 22:25 Supporting flash that powers up locked Todd Poynor
2004-11-24 13:07 ` Josh Boyer
2004-11-25  0:37   ` Todd Poynor
2004-11-24 13:57 ` David Woodhouse
2004-11-25  1:15   ` Todd Poynor [this message]
2004-11-25  9:36     ` David Woodhouse
2004-12-01  3:50       ` Todd Poynor
  -- strict thread matches above, loose matches on Subject: below --
2007-03-19  8:44 supporting " Rodolfo Giometti
2007-03-21 13:25 ` Josh Boyer
2007-03-21 15:09   ` Rodolfo Giometti

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=41A53246.7040704@mvista.com \
    --to=tpoynor@mvista.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /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