Add MMC Password Protection (lock/unlock) support V9: mmc_key_retention.diff
PATCH 2/4 Add MMC Password Protection (lock/unlock) support V9: mmc_key_retention.diff
Implement key retention operations.
Signed-off-by Carlos Eduardo Aguiar <carlos.aguiar <at> indt.org.br>
Signed-off-by Anderson Lizardo <anderson.lizardo <at> indt.org.br>
Signed-off-by Anderson Briglia <anderson.briglia <at> indt.org.br>
drivers/mmc/Kconfig +13 -0
@@ -19,6 +19,19 @@ config MMC_DEBUG This is an option for use by developers; most people should say N here. This enables MMC core and driver debugging. +config MMC_PASSWORDS + boolean "MMC card lock/unlock passwords (EXPERIMENTAL)" + depends on MMC && EXPERIMENTAL + select KEYS + help + Say Y here to enable the use of passwords to lock and unlock + MMC cards. This uses the access key retention support, using + request_key to look up the key associated with each card. + + For example, if you have an MMC card that was locked using + Symbian OS on your cell phone, you won't be able to read it + on Linux without this support. + config MMC_BLOCK tristate "MMC block device driver" depends on MMC && BLOCK
drivers/mmc/mmc.h +8 -0
@@ -19,6 +19,14 @@ int mmc_add_host_sysfs(struct mmc_host *void mmc_remove_host_sysfs (struct mmc_host *host);void mmc_free_host_sysfs (struct mmc_host *host); +/* core-internal data */ +extern struct key_type mmc_key_type; +struct mmc_key_payload { +struct rcu_head rcu;/* RCU destructor */ +unsigned short datalen;/* length of this data */ +char data[0 ];/* actual data */ +}; +int mmc_schedule_work (struct work_struct *work);int mmc_schedule_delayed_work (struct delayed_work *work,unsigned long delay);void mmc_flush_scheduled_work (void );
drivers/mmc/mmc_sysfs.c +86 -4
120 lines not on this page · raw message
Implement key retention operations.
Signed-off-by Carlos Eduardo Aguiar <[email protected]>
Signed-off-by Anderson Lizardo <[email protected]>
Signed-off-by Anderson Briglia <[email protected]>
drivers/mmc/Kconfig +13 -0
@@ -19,6 +19,19 @@ config MMC_DEBUG This is an option for use by developers; most people should say N here. This enables MMC core and driver debugging. +config MMC_PASSWORDS + boolean "MMC card lock/unlock passwords (EXPERIMENTAL)" + depends on MMC && EXPERIMENTAL + select KEYS + help + Say Y here to enable the use of passwords to lock and unlock + MMC cards. This uses the access key retention support, using + request_key to look up the key associated with each card. + + For example, if you have an MMC card that was locked using + Symbian OS on your cell phone, you won't be able to read it + on Linux without this support. + config MMC_BLOCK tristate "MMC block device driver" depends on MMC && BLOCK
drivers/mmc/mmc.h +8 -0
@@ -19,6 +19,14 @@ int mmc_add_host_sysfs(struct mmc_host *void mmc_remove_host_sysfs (struct mmc_host *host);void mmc_free_host_sysfs (struct mmc_host *host); +/* core-internal data */ +extern struct key_type mmc_key_type; +struct mmc_key_payload { +struct rcu_head rcu;/* RCU destructor */ +unsigned short datalen;/* length of this data */ +char data[0 ];/* actual data */ +}; +int mmc_schedule_work (struct work_struct *work);int mmc_schedule_delayed_work (struct delayed_work *work,unsigned long delay);void mmc_flush_scheduled_work (void );
drivers/mmc/mmc_sysfs.c +86 -4
120 lines not on this page · raw message