From: Eric Biggers <ebiggers@kernel.org>
To: linux-scsi@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org, linux-fscrypt@vger.kernel.org,
Alim Akhtar <alim.akhtar@samsung.com>,
Andy Gross <agross@kernel.org>, Avri Altman <avri.altman@wdc.com>,
Barani Muthukumaran <bmuthuku@qti.qualcomm.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Can Guo <cang@codeaurora.org>,
Elliot Berman <eberman@codeaurora.org>,
John Stultz <john.stultz@linaro.org>,
Satya Tangirala <satyat@google.com>,
Steev Klimaszewski <steev@kali.org>,
Thara Gopinath <thara.gopinath@linaro.org>
Subject: [PATCH v5 0/5] Inline crypto support on DragonBoard 845c
Date: Sun, 21 Jun 2020 10:37:08 -0700 [thread overview]
Message-ID: <20200621173713.132879-1-ebiggers@kernel.org> (raw)
Hello,
This patchset implements UFS inline encryption 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 v2 0/3] Inline Encryption support for UFS" by Satya Tangirala.
Link: https://lkml.kernel.org/r/20200618024736.97207-1-satyat@google.com
Most of the logic needed to use ICE is already handled by the blk-crypto
framework (introduced in v5.8-rc1) and by ufshcd-crypto
(the above patchset). 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.
Due to these factors and others, I was able to greatly simplify the
driver from the vendor's original. It works fine in testing with
fscrypt and with a blk-crypto self-test I'm also working on.
This driver also works on several other Snapdragon SoCs.
See the commit messages for details.
This patchset is also available in git at:
Repo: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
Tag: db845c-crypto-v5
Changed v4 => v5:
- Rebased onto v5.8-rc1 + the latest ufshcd-crypto patchset.
- Refer to the ICE registers by name rather than by index.
- Added Tested-by and Acked-by tags.
Changed v3 => v4:
- Rebased onto the v12 inline encryption patchset.
- A couple small cleanups.
Changed v2 => v3:
- Rebased onto the v8 inline encryption patchset. Now the driver
has to opt into inline crypto support rather than opting out.
- Switched qcom_scm_ice_set_key() to use dma_alloc_coherent()
so that we can reliably zeroing the key without assuming that
bounce buffers aren't used. Also added a comment.
- Made the key_size and data_unit_size arguments to
qcom_scm_ice_set_key() be 'u32' instead of 'int'.
Changed v1 => v2:
- Rebased onto the v7 inline encryption patchset.
- Account for all the recent qcom_scm changes.
- Don't ignore errors from ->program_key().
- Don't dereference NULL hba->vops.
- Dropped the patch that added UFSHCD_QUIRK_BROKEN_CRYPTO, as this
flag is now included in the main inline encryption patchset.
- Many other cleanups.
Eric Biggers (5):
firmware: qcom_scm: Add support for programming inline crypto keys
scsi: ufs-qcom: name the dev_ref_clk_ctrl registers
arm64: dts: sdm845: add Inline Crypto Engine registers and clock
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.c | 101 +++++++++++
drivers/firmware/qcom_scm.h | 4 +
drivers/scsi/ufs/Kconfig | 1 +
drivers/scsi/ufs/Makefile | 4 +-
drivers/scsi/ufs/ufs-qcom-ice.c | 245 +++++++++++++++++++++++++++
drivers/scsi/ufs/ufs-qcom.c | 15 +-
drivers/scsi/ufs/ufs-qcom.h | 27 +++
drivers/scsi/ufs/ufshcd-crypto.c | 27 +--
drivers/scsi/ufs/ufshcd.h | 3 +
include/linux/qcom_scm.h | 19 +++
12 files changed, 443 insertions(+), 18 deletions(-)
create mode 100644 drivers/scsi/ufs/ufs-qcom-ice.c
--
2.27.0
next reply other threads:[~2020-06-21 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 17:37 Eric Biggers [this message]
2020-06-21 17:37 ` [PATCH v5 1/5] firmware: qcom_scm: Add support for programming inline crypto keys Eric Biggers
2020-06-21 17:37 ` [PATCH v5 2/5] scsi: ufs-qcom: name the dev_ref_clk_ctrl registers Eric Biggers
2020-06-21 17:37 ` [PATCH v5 3/5] arm64: dts: sdm845: add Inline Crypto Engine registers and clock Eric Biggers
2020-06-21 17:37 ` [PATCH v5 4/5] scsi: ufs: add program_key() variant op Eric Biggers
2020-06-21 17:37 ` [PATCH v5 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=20200621173713.132879-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=eberman@codeaurora.org \
--cc=john.stultz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=satyat@google.com \
--cc=steev@kali.org \
--cc=thara.gopinath@linaro.org \
/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