Thread (22 messages) read the whole thread 22 messages, 3 authors, 2020-03-27

Re: [PATCH v9 07/11] scsi: ufs: Add inline encryption support to UFS

From: Eric Biggers <ebiggers@kernel.org>
Date: 2020-03-26 05:09:55
Also in: linux-ext4, linux-f2fs-devel, linux-fscrypt, linux-fsdevel, linux-scsi

On Wed, Mar 25, 2020 at 08:06:58PM -0700, Satya Tangirala wrote:
Wire up ufshcd.c with the UFS Crypto API, the block layer inline
encryption additions and the keyslot manager.

Signed-off-by: Satya Tangirala <redacted>
Thanks, like the previous patch this looks much better now!

A couple minor nits I noticed while reading this latest version:
quoted hunk ↗ jump to hunk
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index eaeb21b9cda24..3af15880e1e36 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -168,6 +168,8 @@ struct ufs_pm_lvl_states {
  * @intr_cmd: Interrupt command (doesn't participate in interrupt aggregation)
  * @issue_time_stamp: time stamp for debug purposes
  * @compl_time_stamp: time stamp for statistics
+ * @crypto_key_slot: the key slot to use for inline crypto
It would be helpful if the comment mentioned the -1 case:

 * @crypto_key_slot: the key slot to use for inline crypto (-1 if none)
quoted hunk ↗ jump to hunk
+ * @data_unit_num: the data unit number for the first block for inline crypto
  * @req_abort_skip: skip request abort task flag
  */
 struct ufshcd_lrb {
@@ -192,6 +194,10 @@ struct ufshcd_lrb {
 	bool intr_cmd;
 	ktime_t issue_time_stamp;
 	ktime_t compl_time_stamp;
+#if IS_ENABLED(CONFIG_SCSI_UFS_CRYPTO)
+	int crypto_key_slot;
+	u64 data_unit_num;
+#endif
Since CONFIG_SCSI_UFS_CRYPTO is a bool this should use #ifdef, not IS_ENABLED().

- Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help