From: Satya Tangirala <satyat@google.com>
To: Steev Klimaszewski <steev@kali.org>,
Thara Gopinath <thara.gopinath@linaro.org>
Cc: Eric Biggers <ebiggers@google.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v5 5/5] scsi: ufs-qcom: add Inline Crypto Engine support
Date: Tue, 7 Jul 2020 19:12:24 +0000 [thread overview]
Message-ID: <20200707191224.GA2203002@google.com> (raw)
In-Reply-To: <20200621173713.132879-6-ebiggers@kernel.org>
On Sun, Jun 21, 2020 at 10:37:13AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Add support for Qualcomm Inline Crypto Engine (ICE) to ufs-qcom.
>
> The standards-compliant parts, such as querying the crypto capabilities
> and enabling crypto for individual UFS requests, are already handled by
> ufshcd-crypto.c, which itself is wired into the blk-crypto framework.
> However, ICE requires vendor-specific init, enable, and resume logic,
> and it requires that keys be programmed and evicted by vendor-specific
> SMC calls. Make the ufs-qcom driver handle these details.
>
> I tested this on Dragonboard 845c, which is a publicly available
> development board that uses the Snapdragon 845 SoC and runs the upstream
> Linux kernel. This is the same SoC used in the Pixel 3 and Pixel 3 XL
> phones. This testing included (among other things) verifying that the
> expected ciphertext was produced, both manually using ext4 encryption
> and automatically using a block layer self-test I've written.
>
> I've also tested that this driver works nearly as-is on the Snapdragon
> 765 and Snapdragon 865 SoCs. And others have tested it on Snapdragon
> 850, Snapdragon 855, and Snapdragon 865 (see the Tested-by tags).
>
> This is based very loosely on the vendor-provided driver in the kernel
> source code for the Pixel 3, but I've greatly simplified it. Also, for
> now I've only included support for major version 3 of ICE, since that's
> all I have the hardware to test with the mainline kernel. Plus it
> appears that version 3 is easier to use than older versions of ICE.
>
> For now, only allow using AES-256-XTS. The hardware also declares
> support for AES-128-XTS, AES-{128,256}-ECB, and AES-{128,256}-CBC
> (BitLocker variant). But none of these others are really useful, and
> they'd need to be individually tested to be sure they worked properly.
>
> This commit also changes the name of the loadable module from "ufs-qcom"
> to "ufs_qcom", as this is necessary to compile it from multiple source
> files (unless we were to rename ufs-qcom.c).
>
> Tested-by: Steev Klimaszewski <steev@kali.org> # Lenovo Yoga C630
> Tested-by: Thara Gopinath <thara.gopinath@linaro.org> # db845c, sm8150-mtp, sm8250-mtp
Hi Steev and Thara,
I've sent out the patches that add inline encryption support to UFS
(that these patches build upon) at
https://lore.kernel.org/linux-scsi/20200706200414.2027450-1-satyat@google.com/
Can I add "Tested-by"'s from both of you to that patch series?
Thanks!
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> MAINTAINERS | 2 +-
> drivers/scsi/ufs/Kconfig | 1 +
> drivers/scsi/ufs/Makefile | 4 +-
> drivers/scsi/ufs/ufs-qcom-ice.c | 245 ++++++++++++++++++++++++++++++++
> drivers/scsi/ufs/ufs-qcom.c | 12 +-
> drivers/scsi/ufs/ufs-qcom.h | 27 ++++
> 6 files changed, 288 insertions(+), 3 deletions(-)
> create mode 100644 drivers/scsi/ufs/ufs-qcom-ice.c
>
> --
> 2.27.0
>
next prev parent reply other threads:[~2020-07-07 19:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 17:37 [PATCH v5 0/5] Inline crypto support on DragonBoard 845c Eric Biggers
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
2020-07-07 19:12 ` Satya Tangirala [this message]
2020-07-07 20:05 ` Steev Klimaszewski
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=20200707191224.GA2203002@google.com \
--to=satyat@google.com \
--cc=ebiggers@google.com \
--cc=linux-scsi@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.