Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Inline Encryption support for UFS
@ 2020-06-18  2:47 Satya Tangirala
  2020-06-18  2:47 ` [PATCH v2 1/3] scsi: ufs: UFS driver v2.1 spec crypto additions Satya Tangirala
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Satya Tangirala @ 2020-06-18  2:47 UTC (permalink / raw)
  To: linux-scsi; +Cc: Barani Muthukumaran, Kuohong Wang, Kim Boojin, Satya Tangirala

This patch series adds support for inline encryption to UFS using
the inline encryption support in the block layer. It follows the JEDEC
UFSHCI v2.1 specification, which defines inline encryption for UFS.

This patch series previously went through a number of iterations as
part of the "Inline Encryption Support" patchset (last version was v13:
https://lkml.kernel.org/r/20200514003727.69001-1-satyat@google.com).
There aren't any significant changes here from that version.
This patch series is based on v5.8-rc1.

Patch 1 introduces the crypto registers and struct definitions defined
in the UFSHCI v2.1 spec.

Patch 2 introduces functions to manipulate the UFS inline encryption
hardware (again in line with the UFSHCI v2.1 spec) via the block
layer keyslot manager. Device specific drivers must set the
UFSHCD_CAP_CRYPTO in hba->caps before ufshcd_hba_init_crypto is called
to opt-in to inline encryption support.

Patch 3 wires up ufshcd.c with the UFS crypto API introduced in Patch 2.

This patch series has been tested on some Qualcomm chipsets (on the
db845c, sm8150-mtp and sm8250-mtp) using some additional patches at
https://lkml.kernel.org/linux-scsi/20200501045111.665881-1-ebiggers@kernel.org/
and on some Mediatek chipsets using the additional patch in
https://lkml.kernel.org/linux-scsi/20200304022101.14165-1-stanley.chu@mediatek.com/.
These additional patches are required because these chipsets need certain
additional behaviour not specified within the UFSHCI v2.1 spec.

Thanks a lot to all the folks who tested this out!

Changes v1 => v2
 - handle OCS_DEVICE_FATAL_ERROR explicitly in ufshcd_transfer_rsp_status

Satya Tangirala (3):
  scsi: ufs: UFS driver v2.1 spec crypto additions
  scsi: ufs: UFS crypto API
  scsi: ufs: Add inline encryption support to UFS

 drivers/scsi/ufs/Kconfig         |   9 ++
 drivers/scsi/ufs/Makefile        |   1 +
 drivers/scsi/ufs/ufshcd-crypto.c | 226 +++++++++++++++++++++++++++++++
 drivers/scsi/ufs/ufshcd-crypto.h |  60 ++++++++
 drivers/scsi/ufs/ufshcd.c        |  47 ++++++-
 drivers/scsi/ufs/ufshcd.h        |  24 ++++
 drivers/scsi/ufs/ufshci.h        |  67 ++++++++-
 7 files changed, 427 insertions(+), 7 deletions(-)
 create mode 100644 drivers/scsi/ufs/ufshcd-crypto.c
 create mode 100644 drivers/scsi/ufs/ufshcd-crypto.h

-- 
2.27.0.290.gba653c62da-goog


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

end of thread, other threads:[~2020-06-23 10:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-18  2:47 [PATCH v2 0/3] Inline Encryption support for UFS Satya Tangirala
2020-06-18  2:47 ` [PATCH v2 1/3] scsi: ufs: UFS driver v2.1 spec crypto additions Satya Tangirala
2020-06-18  2:47 ` [PATCH v2 2/3] scsi: ufs: UFS crypto API Satya Tangirala
2020-06-18  2:47 ` [PATCH v2 3/3] scsi: ufs: Add inline encryption support to UFS Satya Tangirala
2020-06-23 10:57   ` Alim Akhtar
2020-06-20  3:17 ` [PATCH v2 0/3] Inline Encryption support for UFS Martin K. Petersen
2020-06-20  8:28   ` Avri Altman
2020-06-21 12:35   ` Avri Altman
2020-06-21 12:47     ` Avri Altman
2020-06-21 17:46       ` Eric Biggers
2020-06-21 17:54     ` Alim Akhtar
2020-06-21 19:26       ` Eric Biggers
2020-06-22  7:09         ` Avri Altman
2020-06-21 18:24     ` Satya Tangirala
2020-06-21 18:49       ` Eric Biggers
2020-06-22  7:34 ` [PATCH v2 3/3] scsi: ufs: Add inline encryption support to UFS Avri Altman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox