[PATCH 1/1] MTD: Unlocking all Intel flash that is locked on power up

Nicolas Pitre nico at cam.org
Mon Nov 12 16:43:34 EST 2007


On Mon, 12 Nov 2007, Justin Treon wrote:

> > What about a new partition flag then?  When set the unlock method would 
> > be called on the corresponding partition if the partition is not already 
> > marked read-only.
> > 
> 
> I think that a partition flag is a good idea, but the mtd partition should be
> unlocked by defualt if it is not read only and adding the flag will keep it locked.
> 
> How do you think it could be done that others would be accepting of 
> it?  I do not think everyone would like to see another flag that is so 
> close to a read only flag.

Don't make the unlocking the default.  The flag has simply to be set 
explicitly for the unlock to occur.  Few reasons for this:

1) you don't know if a particular flash requires unlocking after boot, 
   (most flash models don't) so doing it unconditionally is wasteful;

2) the partition might as well be meant to remain locked, except for 
   rare occasions when its content is updated (think bootloader) meaning
   it cannot be marked read-only;

3) this is a security feature and should not be bypassed "by
   default", and therefore the auto-unlock should be dependent on an 
   explicit flag so people needing it will have the opportunity to think 
   about it.


Nicolas



More information about the linux-mtd mailing list