Secure Trim vs Discard Sanitize
The eMMC 4.5 and later specifications mention that the Secure Erase and Secure Trim operations are not meant for eMMC 4.5 and later devices but the driver still performs those operations on when block layer issues a SECDISCARD (or REQ_DISCARD|REQ_SECURE) request. I dont know why the driver did not move to TRIM + SANITIZE or DISCARD + SANITIZE and I could not find any email discussions about this. I have seen the patches that provide sanitize via ioctls but I am more interested if the driver should use the newer commands and should it invoke sanitize when performing a secure discard operation.. -- Thanks, Krishna Konda --- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Hynix eMMC RPMB: Access timeouts, broken?
On 6/4/2013 4:32 AM, Dirk Behme wrote: Using some recent Hynix eMMC devices [1] on our Freescale i.MX6 boards we get harmless (?), but annoying access timeouts accessing the RPMB partition: mmcblk1rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00 mmcblk1rpmb: retrying using single block read ... The output with MMC debug enabled below [2]. This seems to be harmless because it stops, but is annoying due to some auto mounter trying to access all available partitions. The RPMB partition should never be mounted. Its not a regular partition and does not a file system on it. So my suggestion would to be to modify the auto mounter to not mount RPMB paritions. -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/5] mmc: Add access to RPMB partition
On Tue, 2012-11-20 at 09:25 +0100, Loic PALLARDY wrote: I have a test program I'll integrate in mmc-utils. Regards, Loic Loic/Linus/Chris, I think the IOCTL is not complete in terms of handling the RPMB requests. Here is why I think that is - let me know your opinion There are four request types that are needed to be supported - two under read category and two under write. They are Reads --- 1. Read Write Counter 2. Authenticated data read Writes --- 1. Provision RPMB key (though it might be done in a secure environment) 2. Authenticated data read While its given that the rpmb data frames are going to have that information encoded in it and the frames will be generated by a secure piece of code, the request types can be classified as above. The ioctl interface to do this but currently that does the following 1. Switch partition 2. Set block count 3. One command - whatever is passed in by the userspace application. So here are the set of commands that need to happen in a rpmb read operation 1. Switch partition 2. Set block count 3. Write data frame - CMD25 to write the rpmb data frame 4. Set block count 5. Read the data - CMD18 to do the actual read I am guessing that you would expect the userspace application too call into the ioctl twice to take care of the 4 5 and that might not be an issue if there was no request processed for mmcqd i.e. no other process/thread claims the host. But if that were to happen, then the rpmb operation will fail - please let me know if this assumption or my understanding of the spec is wrong. Similarly for rpmb write operation, these are the step involved 1. Switch partition 2. Set block count 3. Write data frame - CMD25 to write the rpmb data frame with data 4. Set block count 5. Read the data - CMD25 to write rpmb data frame indicating that rpmb result register is about to be read 6. Set block count 7. Read rpmb result - CMD18 to read the rpmb result register In the case of write, there are an additional two commands compared to reads. Since all of these needs to be done in one shot, I believe the current ioctl is not sufficient and this can be handled in the following ways 1. Extend the current ioctl to handle both cases 2. Add a new ioctl cmd for rpmb requests Personally I think adding another ioctl is a better way to do this since the current ioctl will get cumbersome and technically the rpmb requests are different kind of requests that need to be done atomically. I am coding this up as a separate ioctl but before I post the patch, I wanted feedback on this approach. -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/5] mmc: Add access to RPMB partition
On Sat, 2012-11-17 at 18:12 -0500, Chris Ball wrote: I've merged this to mmc-next for 3.8 now; thanks to everyone who Acked. If you have any userspace sample code that could be added to mmc-utils to show how the interface can be used, feel free to send a patch. Thanks, - Chris. Thanks Chris. Currently we dont have anything mmc-utils for using this interface. -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 0/5] mmc: Add access to RPMB partition
On Thu, 2012-11-15 at 09:04 +0100, Linus Walleij wrote: Hi Loic, Chris, are there any plans to merge these patchsets? I did not see this in mmc-next. I was sort of wondering the same. Krishna, could you provide your Acked-by/Reviewed-by tag so as to convince Chris that this is a nice feature? Sure thing. -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 5/5] mmc: card: Add RPMB support in IOCTL interface
On Fri, 2012-11-16 at 13:17 -0800, Krishna Konda wrote: From: Loic Pallardy loic.pallardy-...@stericsson.com Date: Mon, Aug 6, 2012 at 8:12 AM Subject: [PATCH v3 5/5] mmc: card: Add RPMB support in IOCTL interface To: linux-mmc@vger.kernel.org, Chris Ball c...@laptop.org Cc: Linus Walleij linus.wall...@linaro.org, STEricsson_nomadik_linux stericsson_nomadik_li...@list.st.com, Ulf Hansson ulf.hans...@stericcson.com, Loic Pallardy loic.pallardy-...@stericsson.com, Alex Macro alex.ma...@stericsson.com, Loic Pallardy loic.palla...@stericsson.com RPMB partition is accessing though /dev/block/mmcXrpmb device User callers can read and write entire data frame(s) as defined by JEDEC Standard JESD84-A441, using standard IOCTL interface. Signed-off-by: Alex Macro alex.ma...@stericsson.com Signed-off-by: Loic Pallardy loic.palla...@stericsson.com Acked-by: Linus Walleij linus.wall...@linaro.org Reviewed-by: Namjae Jeon linkinj...@gmail.com Acked-by: Krishna Konda kko...@codeaurora.org -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 4/5] mmc: core: Add mmc_set_blockcount feature
On Fri, 2012-11-16 at 13:17 -0800, Krishna Konda wrote: From: Loic Pallardy loic.pallardy-...@stericsson.com Date: Mon, Aug 6, 2012 at 8:12 AM Subject: [PATCH v3 4/5] mmc: core: Add mmc_set_blockcount feature To: linux-mmc@vger.kernel.org, Chris Ball c...@laptop.org Cc: Linus Walleij linus.wall...@linaro.org, STEricsson_nomadik_linux stericsson_nomadik_li...@list.st.com, Ulf Hansson ulf.hans...@stericcson.com, Loic Pallardy loic.pallardy-...@stericsson.com, Alex Macro alex.ma...@stericsson.com, Loic Pallardy loic.palla...@stericsson.com Provide support for automatically sending Set Block Count (CMD23) messages. Used at least for RPMB support. Signed-off-by: Alex Macro alex.ma...@stericsson.com Signed-off-by: Loic Pallardy loic.palla...@stericsson.com Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Johan Rudholm johan.rudh...@stericsson.com Reviewed-by: Namjae Jeon linkinj...@gmail.com Acked-by: Krishna Konda kko...@codeaurora.org -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 3/5] mmc: core: Extend sysfs to ext_csd parameters for RPMB support
On Fri, 2012-11-16 at 13:17 -0800, Krishna Konda wrote: From: Loic Pallardy loic.pallardy-...@stericsson.com Date: Mon, Aug 6, 2012 at 8:12 AM Subject: [PATCH v3 3/5] mmc: core: Extend sysfs to ext_csd parameters for RPMB support To: linux-mmc@vger.kernel.org, Chris Ball c...@laptop.org Cc: Linus Walleij linus.wall...@linaro.org, STEricsson_nomadik_linux stericsson_nomadik_li...@list.st.com, Ulf Hansson ulf.hans...@stericcson.com, Loic Pallardy loic.pallardy-...@stericsson.com, Loic Pallardy loic.palla...@stericsson.com Extend current sysfs access to ext_csd rpmb parameters (RPMB partition size) and rel_sector information. Signed-off-by: Loic Pallardy loic.palla...@stericsson.com Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Johan Rudholm johan.rudh...@stericsson.com Reviewed-by: Namjae Jeon linkinj...@gmail.com Acked-by: Krishna Konda kko...@codeaurora.org -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 2/5] mmc: card: Do not scan RPMB partitions
On Fri, 2012-11-16 at 13:17 -0800, Krishna Konda wrote: From: Loic Pallardy loic.pallardy-...@stericsson.com Date: Mon, Aug 6, 2012 at 8:12 AM Subject: [PATCH v3 2/5] mmc: card: Do not scan RPMB partitions To: linux-mmc@vger.kernel.org, Chris Ball c...@laptop.org Cc: Linus Walleij linus.wall...@linaro.org, STEricsson_nomadik_linux stericsson_nomadik_li...@list.st.com, Ulf Hansson ulf.hans...@stericcson.com, Loic Pallardy loic.pallardy-...@stericsson.com, Johan Rudholm johan.rudh...@stericsson.com Do not scan rpmb partitions for soft partitions, since the rpmb partition contains protected data. Silences the following message during boot: mmcblkXRPMB: unknown partition table Signed-off-by: Johan Rudholm johan.rudh...@stericsson.com Acked-by: Linus Walleij linus.wall...@linaro.org Reviewed-by: Namjae Jeon linkinj...@gmail.com Acked-by: Krishna Konda kko...@codeaurora.org -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 1/5] mmc: core: Expose access to RPMB partition
On Fri, 2012-11-16 at 13:16 -0800, Krishna Konda wrote: From: Loic Pallardy loic.pallardy-...@stericsson.com Date: Mon, Aug 6, 2012 at 8:12 AM Subject: [PATCH v3 1/5] mmc: core: Expose access to RPMB partition To: linux-mmc@vger.kernel.org, Chris Ball c...@laptop.org Cc: Linus Walleij linus.wall...@linaro.org, STEricsson_nomadik_linux stericsson_nomadik_li...@list.st.com, Ulf Hansson ulf.hans...@stericcson.com, Loic Pallardy loic.pallardy-...@stericsson.com, Alex Macro alex.ma...@stericsson.com, Loic Pallardy loic.palla...@stericsson.com Following JEDEC standard, if the mmc support RPMB partition, a new interface is created and exposed via /dev/block. Users will be able to access RPMB partition using standard mmc IOCTL command. Signed-off-by: Alex Macro alex.ma...@stericsson.com Signed-off-by: Loic Pallardy loic.palla...@stericsson.com Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Johan Rudholm johan.rudh...@stericsson.com Reviewed-by: Namjae Jeon linkinj...@gmail.com Acked-by: Krishna Konda kko...@codeaurora.org -- Thanks, Krishna Konda --- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: [PATCH v3 0/5] mmc: Add access to RPMB partition
On Wed, 2012-11-14 at 12:58 -0800, Krishna Konda wrote: From: Loic Pallardy loic.pallardy-...@stericsson.com Date: Mon, Aug 6, 2012 at 8:12 AM Subject: [PATCH v3 0/5] mmc: Add access to RPMB partition To: linux-mmc@vger.kernel.org, Chris Ball c...@laptop.org Cc: Linus Walleij linus.wall...@linaro.org, STEricsson_nomadik_linux stericsson_nomadik_li...@list.st.com, Ulf Hansson ulf.hans...@stericcson.com, Loic Pallardy loic.pallardy-...@stericsson.com The goal of this patchserie is to offer access to MMC RPMB (Replay Protected Memory Block) partition. The RPMB partition is used in general to store some secure data. It is accessible through a trusted mechanism described in JEDEC standard JESD84-A441. This patchserie proposes following modifications: - detect RPMB capability and create RPMB block device if supported - extend MMC sysfs to provide access to RPMB partition size and reliable write sector count (information needed by user space to acces RPMB partition) - update IOCTL to support RPMB access. This includes automatic partition switch and sending of Set Block Count (CMD23) message. RPMB partition becomes accessible using standard IOCTL interface. Patches don't include trusted mechanism or any verification. It is user space or secure application responsability to provide the right command and the entire data frame as defined by JEDEC standard. --- Changes in v2: - Correction in patch 2: mmc: card: Do not scan RPMB partitions Remove GENHD_FL_EXT_DEVT flag Changes in v3: - Add acked-by and reviewed-by tags --- Loic Pallardy (5): mmc: core: Expose access to RPMB partition mmc: card: Do not scan RPMB partitions mmc: core: Extend sysfs to ext_csd parameters for RPMB support mmc: core: Add mmc_set_blockcount feature mmc: card: Add RPMB support in IOCTL interface Documentation/mmc/mmc-dev-attrs.txt | 7 drivers/mmc/card/block.c| 66 + drivers/mmc/core/core.c | 14 drivers/mmc/core/mmc.c | 15 + include/linux/mmc/card.h| 2 ++ include/linux/mmc/core.h| 2 ++ include/linux/mmc/mmc.h | 2 ++ 7 files changed, 108 insertions(+) Hi Loic, Chris, are there any plans to merge these patchsets? I did not see this in mmc-next. Thanks, Krishna Konda -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html