linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Add password protected lock/unlock support for SD/MMC
@ 2013-08-13 15:21 Al Cooper
  2013-08-13 15:21 ` [PATCH 1/7] mmc: lock: Use the kernel "KEYS" subsystem to get a card's password Al Cooper
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Al Cooper @ 2013-08-13 15:21 UTC (permalink / raw)
  To: cjb, linux-mmc; +Cc: Al Cooper

This set of patches adds support for password protected locking
and unlocking of MMC and SD devices. It uses the LOCK/UNLOCK command
(CMD42) available in both the MMC and SD command sets.

Some of this code was based on a patch set submitted in 2006 by
Anderson Briglia "Add MMC Password Protection (lock/unlock)". This
patch set never made it into mainline. 

By default, a card with no password assigned is always in "unlocked"
state. After password assignment, in the next power cycle the card
switches to a "locked" state where only the "basic" and "lock card"
command classes are accepted by the card. Only after unlocking it with
the correct password can the card be used for normal operations like
block I/O.

Password management and caching is done through the "Kernel Key
Retention Service" mechanism and the sysfs filesystem. Two new sysfs
attributes were added. The "lock" attribute is used to lock, unlock,
assign a password, clear a password and force erase a card. The
"unlock_retry" attribute is used to retry an unlock that failed
during boot because the rootfs was not yet available with the password.

Al Cooper (7):
  mmc: lock: Use the kernel "KEYS" subsystem to get a card's password
  mmc: lock: Add low level LOCK_UNLOCK command
  mmc: lock: Add funtion to unlock a password locked card
  mmc: lock: Add card lock/unlock maintenance commands
  mmc: lock: Change SD init functionality to handle locked SD cards
  mmc: lock: Prevent partition table read for locked cards.
  mmc: lock: Change MMC init to handle locked cards.

 drivers/mmc/card/block.c   |   7 +++
 drivers/mmc/core/Kconfig   |   8 +++
 drivers/mmc/core/core.c    | 114 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/core.h    |  20 ++++++-
 drivers/mmc/core/mmc.c     | 124 ++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/mmc_ops.c | 112 ++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/mmc_ops.h |  13 +++++
 drivers/mmc/core/sd.c      | 138 +++++++++++++++++++++++++++++++++------------
 include/linux/mmc/card.h   |   6 ++
 9 files changed, 505 insertions(+), 37 deletions(-)

-- 
1.8.1.3



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-08-23 10:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 15:21 [PATCH 0/7] Add password protected lock/unlock support for SD/MMC Al Cooper
2013-08-13 15:21 ` [PATCH 1/7] mmc: lock: Use the kernel "KEYS" subsystem to get a card's password Al Cooper
2013-08-15  1:16   ` Brian Norris
2013-08-23 10:34   ` Ulf Hansson
2013-08-13 15:21 ` [PATCH 2/7] mmc: lock: Add low level LOCK_UNLOCK command Al Cooper
2013-08-13 15:21 ` [PATCH 3/7] mmc: lock: Add funtion to unlock a password locked card Al Cooper
2013-08-13 15:21 ` [PATCH 4/7] mmc: lock: Add card lock/unlock maintenance commands Al Cooper
2013-08-13 15:21 ` [PATCH 5/7] mmc: lock: Change SD init functionality to handle locked SD cards Al Cooper
2013-08-13 15:21 ` [PATCH 6/7] mmc: lock: Prevent partition table read for locked cards Al Cooper
2013-08-13 15:21 ` [PATCH 7/7] mmc: lock: Change MMC init to handle " Al Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).