All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Ernberg <john.ernberg@actia.se>
To: "a.fatoum@pengutronix.de" <a.fatoum@pengutronix.de>
Cc: "andreas@rammhold.de" <andreas@rammhold.de>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"david@sigma-star.at" <david@sigma-star.at>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"ebiggers@kernel.org" <ebiggers@kernel.org>,
	"franck.lenormand@nxp.com" <franck.lenormand@nxp.com>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"horia.geanta@nxp.com" <horia.geanta@nxp.com>,
	"j.luebbe@pengutronix.de" <j.luebbe@pengutronix.de>,
	"jarkko@kernel.org" <jarkko@kernel.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"jmorris@namei.org" <jmorris@namei.org>,
	John Ernberg <john.ernberg@actia.se>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	"matthias.schiffer@ew.tq-group.com" 
	<matthias.schiffer@ew.tq-group.com>,
	"pankaj.gupta@nxp.com" <pankaj.gupta@nxp.com>,
	"richard@nod.at" <richard@nod.at>,
	"s.trumtrar@pengutronix.de" <s.trumtrar@pengutronix.de>,
	"serge@hallyn.com" <serge@hallyn.com>,
	"sumit.garg@linaro.org" <sumit.garg@linaro.org>,
	"tharvey@gateworks.com" <tharvey@gateworks.com>,
	"zohar@linux.ibm.com" <zohar@linux.ibm.com>
Subject: Re: [PATCH v8 0/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys
Date: Sat, 7 May 2022 21:30:16 +0000	[thread overview]
Message-ID: <20220507213003.3373206-1-john.ernberg@actia.se> (raw)
In-Reply-To: <09e2552c-7392-e1da-926b-53c7db0b118d@pengutronix.de>

Hi Ahmad,

> > 
> > dmesg snips:
> > [    1.296772] trusted_key: Job Ring Device allocation for transform failed
> > ...
> > [    1.799768] caam 31400000.crypto: device ID = 0x0a16040000000100 (Era 9)
> > [    1.807142] caam 31400000.crypto: job rings = 2, qi = 0
> > [    1.822667] caam algorithms registered in /proc/crypto
> > [    1.830541] caam 31400000.crypto: caam pkc algorithms registered in /proc/crypto
> > [    1.841807] caam 31400000.crypto: registering rng-caam
> > 
> > I didn't quite have the time to get a better trace than that.
> 
> I don't see a crypto@31400000 node upstream. Where can I see your device tree?

Apologies for forgetting to mention that, I took it from the NXP tree
while removing the SM and SECO bits [1].
I also had to rebase some of their patches onto 5.17 for the CAAM to
probe, as the SCU makes some register pages unavailable.

> Initcall ordering does the right thing, but if CAAM device probe is deferred beyond
> late_initcall, then it won't help.
> 
> This is a general limitation with trusted keys at the moment. Anything that's
> not there by the time of the late_initcall won't be tried again. You can work
> around it by having trusted keys as a module. We might be able to do something
> with fw_devlinks in the future and a look into your device tree would help here,
> but I think that should be separate from this patch series.

Thank for you the explanation, it makes sense, and I agree that such work
would be a different patch set.

> 
> Please let me know if the module build improves the situation for you.
> 

After I changed trusted keys to a module I got it working. Which is good
enough for me as QXP CAAM support is not upstream yet.

Feel free to add my tested by if you need to make another spin.
Tested-by: John Ernberg <john.ernberg@actia.se> # iMX8QXP

I didn't test v9 as I would have to patch around the new patch due to
the SCU.

Best regards // John Ernberg

[1]: https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8-ss-security.dtsi?h=lf-5.10.y

  reply	other threads:[~2022-05-07 21:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 14:21 [PATCH v8 0/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys Ahmad Fatoum
2022-04-28 14:01 ` [PATCH v8 1/6] KEYS: trusted: allow use of TEE as backend without TCG_TPM support Ahmad Fatoum
2022-04-28 14:01 ` [PATCH v8 2/6] KEYS: trusted: allow use of kernel RNG for key material Ahmad Fatoum
2022-04-28 14:01 ` [PATCH v8 3/6] crypto: caam - add in-kernel interface for blob generator Ahmad Fatoum
2022-05-03 18:24   ` Michael Walle
2022-05-04  6:39     ` Ahmad Fatoum
2022-04-28 14:01 ` [PATCH v8 4/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys Ahmad Fatoum
2022-04-28 14:01 ` [PATCH v8 5/6] doc: trusted-encrypted: describe new CAAM trust source Ahmad Fatoum
2022-05-04  4:15   ` Jarkko Sakkinen
2022-04-28 14:01 ` [PATCH v8 6/6] MAINTAINERS: add myself as CAAM trusted key maintainer Ahmad Fatoum
2022-05-04  4:24   ` Jarkko Sakkinen
2022-05-04  4:57     ` Ahmad Fatoum
2022-05-05 14:58 ` [PATCH v8 0/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys John Ernberg
2022-05-05 17:33   ` Ahmad Fatoum
2022-05-07 21:30     ` John Ernberg [this message]
2022-05-11 10:44       ` Ahmad Fatoum

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=20220507213003.3373206-1-john.ernberg@actia.se \
    --to=john.ernberg@actia.se \
    --cc=a.fatoum@pengutronix.de \
    --cc=andreas@rammhold.de \
    --cc=davem@davemloft.net \
    --cc=david@sigma-star.at \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=franck.lenormand@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=j.luebbe@pengutronix.de \
    --cc=jarkko@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=jmorris@namei.org \
    --cc=kernel@pengutronix.de \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=pankaj.gupta@nxp.com \
    --cc=richard@nod.at \
    --cc=s.trumtrar@pengutronix.de \
    --cc=serge@hallyn.com \
    --cc=sumit.garg@linaro.org \
    --cc=tharvey@gateworks.com \
    --cc=zohar@linux.ibm.com \
    /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.