linux-fscrypt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org
Cc: linux-block@vger.kernel.org, linux-fscrypt@vger.kernel.org,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	Pedro Sousa <pedrom.sousa@synopsys.com>,
	John Stultz <john.stultz@linaro.org>,
	Barani Muthukumaran <bmuthuku@qti.qualcomm.com>,
	Can Guo <cang@codeaurora.org>,
	Satya Tangirala <satyat@google.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	"Theodore Y . Ts'o" <tytso@mit.edu>
Subject: [RFC PATCH 0/5] Inline crypto support on DragonBoard 845c
Date: Thu,  9 Jan 2020 22:16:29 -0800	[thread overview]
Message-ID: <20200110061634.46742-1-ebiggers@kernel.org> (raw)

Hello,

This patchset implements UFS inline crypto support on the DragonBoard
845c, using the Qualcomm Inline Crypto Engine (ICE) that's present on
the Snapdragon 845 SoC.

This is based on top of the patchset "[PATCH v6 0/9] Inline Encryption
Support" by Satya Tangirala, which adds support for the UFS standard
inline crypto, the block layer changes needed to use inline crypto, and
support for inline crypto in fscrypt (ext4 and f2fs encryption).  Link:
https://lkml.kernel.org/r/20191218145136.172774-1-satyat@google.com

This new patchset is mostly a RFC showing hardware inline crypto working
on a publicly available development board that runs the mainline Linux
kernel.  While patches 1-2 could be applied now, patches 3-5 depend on
the main "Inline Encryption Support" patchset being merged first.

Most of the logic needed to use ICE is already handled by ufshcd-crypto
and the blk-crypto framework, which are introduced by the "Inline
Encryption Support" patchset.  Therefore, this new patchset just adds
the vendor-specific parts.  I also only implemented support for version
3 of the ICE hardware, which seems to be easier to use than older
versions; and for now I only implemented UFS support, not eMMC.

Due to these factors, I was able to greatly simplify the driver from the
vendor's original.  It seems to work fine in some preliminary testing
with fscrypt, and with a blk-crypto self-test I'm also working on.  But
I'd appreciate feedback from anyone who may be more familiar with this
hardware as to whether I might have missed anything important.

This patchset is also available in git at
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/tag/?h=db845c-crypto-v1

Eric Biggers (5):
  firmware: qcom_scm: Add support for programming inline crypto keys
  arm64: dts: sdm845: add Inline Crypto Engine registers and clock
  scsi: ufs: add quirk to disable inline crypto support
  scsi: ufs: add program_key() variant op
  scsi: ufs-qcom: add Inline Crypto Engine support

 MAINTAINERS                          |   2 +-
 arch/arm64/boot/dts/qcom/sdm845.dtsi |  13 +-
 drivers/firmware/qcom_scm-32.c       |  14 ++
 drivers/firmware/qcom_scm-64.c       |  31 ++++
 drivers/firmware/qcom_scm.c          |  78 +++++++++
 drivers/firmware/qcom_scm.h          |   9 +
 drivers/scsi/ufs/Kconfig             |   1 +
 drivers/scsi/ufs/Makefile            |   4 +-
 drivers/scsi/ufs/ufs-qcom-ice.c      | 247 +++++++++++++++++++++++++++
 drivers/scsi/ufs/ufs-qcom.c          |  14 +-
 drivers/scsi/ufs/ufs-qcom.h          |  35 ++++
 drivers/scsi/ufs/ufshcd-crypto.c     |  27 ++-
 drivers/scsi/ufs/ufshcd.h            |  12 ++
 include/linux/qcom_scm.h             |  17 ++
 14 files changed, 490 insertions(+), 14 deletions(-)
 create mode 100644 drivers/scsi/ufs/ufs-qcom-ice.c

-- 
2.24.1


             reply	other threads:[~2020-01-10  6:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  6:16 Eric Biggers [this message]
2020-01-10  6:16 ` [RFC PATCH 1/5] firmware: qcom_scm: Add support for programming inline crypto keys Eric Biggers
2020-01-10  6:16 ` [RFC PATCH 2/5] arm64: dts: sdm845: add Inline Crypto Engine registers and clock Eric Biggers
2020-01-10  6:16 ` [RFC PATCH 3/5] scsi: ufs: add quirk to disable inline crypto support Eric Biggers
2020-01-10  6:16 ` [RFC PATCH 4/5] scsi: ufs: add program_key() variant op Eric Biggers
2020-01-10  6:16 ` [RFC PATCH 5/5] scsi: ufs-qcom: add Inline Crypto Engine support Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200110061634.46742-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=agross@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=bmuthuku@qti.qualcomm.com \
    --cc=cang@codeaurora.org \
    --cc=jaegeuk@kernel.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pedrom.sousa@synopsys.com \
    --cc=satyat@google.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).