Re: [PATCH] mmc: boot partition ro lock support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ulf, Johan,

----- Original Message -----
> From: "Ulf Hansson" <ulf.hansson@xxxxxxxxxxxxxx>
> To: linux-mmc@xxxxxxxxxxxxxxx, "Chris Ball" <cjb@xxxxxxxxxx>
> Cc: "Per Forlin" <per.forlin@xxxxxxxxxxxxxx>, "Ulf Hansson" <ulf.hansson@xxxxxxxxxxxxxx>, "Lee Jones"
> <lee.jones@xxxxxxxxxx>, "Johan Rudholm" <johan.rudholm@xxxxxxxxxxxxxx>, "John Beckett" <john.beckett@xxxxxxxxxxxxxx>
> Sent: Friday, October 21, 2011 9:17:23 AM
> Subject: [PATCH] mmc: boot partition ro lock support
> 
> From: Johan Rudholm <johan.rudholm@xxxxxxxxxxxxxx>
> 
> Enable boot partitions to be power and permanently read-only locked
> via
> a sysfs entry. There will be one sysfs entry for the main mmc device:
> 
> /sys/block/mmcblkX/boot_partition_ro_lock
> 
> and one for each boot partition:
> 
> /sys/block/mmcblkXbootY/ro_lock
> 
> The boot partitions are power or permanently locked by writing
> "pwr_ro"
> or "perm_ro" to one of the files.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxx>
> Signed-off-by: John Beckett <john.beckett@xxxxxxxxxxxxxx>
> Signed-off-by: Johan Rudholm <johan.rudholm@xxxxxxxxxxxxxx>
> ---

What does power locking do that force_ro currently doesn't achieve?

The permalocking brick-potential (more like paper-weight-potential) is IMO unacceptably
high that something like this is just accessible via a sysfs attribute. This is exactly
why the boot partitions were put under force_ro, so that some poor sap wouldn't end up
nuking the boot partitions (with obvious consequences), and permalocking seems even nastier.

At a bigger picture, I'm uncertain what the point of this is. It adds code complexity for,
a generally rare and possibly self-destructive operation. This is like the GP partitioning 
support - it's a once-a-time (and unrecoverable) operation usually done at manufacturing (or initial
provisioning time) that shouldn't be even exposed to the general purpose user. This would be a
good use of that arbitrary-CMD ioctl interface John Calixto put in.

Thanks,
A
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux