linux-fscrypt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: "Peng.Zhou" <peng.zhou@mediatek.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-fscrypt@vger.kernel.org,
	Satya Tangirala <satyat@google.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Ritesh Harjani <riteshh@codeaurora.org>,
	Asutosh Das <asutoshd@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	Neeraj Soni <neersoni@codeaurora.org>,
	Barani Muthukumaran <bmuthuku@codeaurora.org>,
	Konrad Dybcio <konradybcio@gmail.com>,
	kuohong.wang@mediatek.com, gray.jia@mediatek.com,
	StanleyChu <stanley.chu@mediatek.com>,
	peng zhou <peng.zhou@medaitek.com>
Subject: Re: [PATCH 0/8] eMMC inline encryption support
Date: Thu, 17 Dec 2020 18:52:06 -0800	[thread overview]
Message-ID: <X9wZVvOIH4diFqWn@sol.localdomain> (raw)
In-Reply-To: <1608248441.2255.5.camel@mbjsdccf07>

On Fri, Dec 18, 2020 at 07:40:41AM +0800, Peng.Zhou wrote:
> > > Hi Eric,
> > > 
> > > I also have a question about reprogramming keys scenarios, if some SoC
> > > vensors' eMMC host will power down or something else like that keys will
> > > be lost after runtime suspend, that means we must do reprogramming keys
> > > in runtime resume, right? Do you think that we should add it in
> > > cqhci-core layer(such as __cqhci_enable()) or every SoC vendor's host
> > > driver resume path?
> > > 
> > 
> > The keys should only be lost on reset, not on runtime suspend.  So I believe the
> > code I've proposed is sufficient.
> > 
> > - Eric
> 
> That's a little too absolute for me...anyway that's my concern for much
> more SoC vendors who want to be compatible with your framework in
> future.Thank you for explanation.

But the current approach works on all the hardware that's been tested so far,
right?  And programming the keys can take a long time, so it shouldn't be done
unnecessarily.  (I've heard it's fairly fast on Mediatek SoCs.  However, with
Qualcomm ICE it takes longer.)

It seems that host controller configuration typically doesn't get lost during
runtime suspend, and the keyslots are no exception to that.

And if (hypothetically) a host controller that adds crypto support in the future
actually does need to restore the keys during runtime resume, it can just do it
in its ->runtime_resume() method.

So from what I can see, there isn't anything else we should do for now.

- Eric

  parent reply	other threads:[~2020-12-18  2:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 19:40 [PATCH 0/8] eMMC inline encryption support Eric Biggers
2020-11-12 19:40 ` [PATCH 1/8] mmc: add basic support for inline encryption Eric Biggers
2020-12-02 14:25   ` Adrian Hunter
2020-11-12 19:40 ` [PATCH 2/8] mmc: cqhci: rename cqhci.c to cqhci-core.c Eric Biggers
2020-12-02 13:33   ` Adrian Hunter
2020-11-12 19:40 ` [PATCH 3/8] mmc: cqhci: add support for inline encryption Eric Biggers
2020-12-02 13:14   ` Adrian Hunter
2020-12-03  1:17     ` Eric Biggers
2020-11-12 19:40 ` [PATCH 4/8] mmc: cqhci: add cqhci_host_ops::program_key Eric Biggers
2020-12-02 13:34   ` Adrian Hunter
2020-11-12 19:40 ` [PATCH 5/8] firmware: qcom_scm: update comment for ICE-related functions Eric Biggers
2020-11-12 19:40 ` [PATCH 6/8] dt-bindings: mmc: sdhci-msm: add ICE registers and clock Eric Biggers
2020-11-12 19:40 ` [PATCH 7/8] arm64: dts: qcom: sdm630: add ICE registers and clocks Eric Biggers
2020-11-12 19:40 ` [PATCH 8/8] mmc: sdhci-msm: add Inline Crypto Engine support Eric Biggers
2020-11-14  0:40   ` Eric Biggers
2020-12-02 13:56   ` Adrian Hunter
2020-12-03  1:18     ` Eric Biggers
2020-11-20 18:54 ` [PATCH 0/8] eMMC inline encryption support Eric Biggers
2020-11-20 19:29   ` Adrian Hunter
2020-11-20 19:44     ` Eric Biggers
2020-11-23  7:04       ` Adrian Hunter
2020-11-24  2:01         ` Eric Biggers
2020-11-25  9:03           ` Stanley Chu
     [not found]             ` <1608196892.11508.0.camel@mbjsdccf07>
2020-12-17 18:20               ` Eric Biggers
     [not found]                 ` <1608248441.2255.5.camel@mbjsdccf07>
2020-12-18  2:52                   ` Eric Biggers [this message]
2020-11-25  9:56   ` Ulf Hansson
2021-01-04 20:46     ` Eric Biggers
2021-01-07 10:15       ` Ulf Hansson

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=X9wZVvOIH4diFqWn@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=agross@kernel.org \
    --cc=asutoshd@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=bmuthuku@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gray.jia@mediatek.com \
    --cc=konradybcio@gmail.com \
    --cc=kuohong.wang@mediatek.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=neersoni@codeaurora.org \
    --cc=peng.zhou@medaitek.com \
    --cc=peng.zhou@mediatek.com \
    --cc=riteshh@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=satyat@google.com \
    --cc=stanley.chu@mediatek.com \
    --cc=ulf.hansson@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;
as well as URLs for NNTP newsgroup(s).