From: Nikolaus Voss <nv@vosn.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Horia Geantă" <horia.geanta@nxp.com>,
"Pankaj Gupta" <pankaj.gupta@nxp.com>,
"Gaurav Jain" <gaurav.jain@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
"David Gstir" <david@sigma-star.at>,
"Steffen Trumtrar" <s.trumtrar@pengutronix.de>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jarkko Sakkinen" <jarkko@kernel.org>
Subject: Re: [PATCH] crypto: caam: blob_gen.c: warn if key is insecure
Date: Mon, 7 Nov 2022 08:44:55 +0100 (CET) [thread overview]
Message-ID: <d1b8787c-7c69-43e2-5078-d8affcdd8bd4@vosn.de> (raw)
In-Reply-To: <Y2TSRSlefTj6bvYK@gondor.apana.org.au>
On Fri, 4 Nov 2022, Herbert Xu wrote:
> On Wed, Oct 19, 2022 at 02:44:56PM +0200, Nikolaus Voss wrote:
>>
>> @@ -62,11 +63,13 @@ int caam_process_blob(struct caam_blob_priv *priv,
>> struct caam_blob_info *info, bool encap)
>> {
>> struct caam_blob_job_result testres;
>> + const struct caam_drv_private *ctrlpriv;
>
> Please keep the declarations sorted by length in reverse.
ok!
>
>> @@ -100,6 +103,11 @@ int caam_process_blob(struct caam_blob_priv *priv,
>> goto out_unmap_in;
>> }
>>
>> + ctrlpriv = dev_get_drvdata(jrdev->parent);
>> + moo = FIELD_GET(CSTA_MOO, ctrlpriv->ctrl->perfmon.status);
>> + if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
>> + dev_warn(jrdev, "using insecure test key!\n");
>
> Who is the audience of this warning? Is it possible for this warning
> to be too frequent?
The warning is issued every time the non-volatile hardware test key is
used to seal/unseal data. This way, the association to the operation is
strong and is less likely to be ignored by mistake. Further, the system
security monitor can transition to a non-secure state any time, so one
warning during boot-up doesn't suffice. IMO, on a typical system, the
warning occurs with very low frequency, only a few times during
e.g. authenication or mounting of encrypted volumes.
The audience is the developer who forgets to enable secure boot (HAB) or
even doesn't know she has to enable HAB to employ the device's unique
hardware key instead of the test key.
Niko
next prev parent reply other threads:[~2022-11-07 7:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221019134706.E52E71D10@mail.steuer-voss.de>
2022-11-04 8:50 ` Herbert Xu
2022-11-07 7:44 ` Nikolaus Voss [this message]
2022-10-19 12:44 Nikolaus Voss
2022-11-04 9:05 ` Ahmad Fatoum
2022-11-07 7:46 ` Nikolaus Voss
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=d1b8787c-7c69-43e2-5078-d8affcdd8bd4@vosn.de \
--to=nv@vosn.de \
--cc=a.fatoum@pengutronix.de \
--cc=davem@davemloft.net \
--cc=david@sigma-star.at \
--cc=gaurav.jain@nxp.com \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@nxp.com \
--cc=jarkko@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.gupta@nxp.com \
--cc=s.trumtrar@pengutronix.de \
/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
all inboxes | Powered by JetHome®