From: Marco Felsch <m.felsch@pengutronix.de>
To: Pankaj Gupta <pankaj.gupta@nxp.com>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>,
Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Frank Li <frank.li@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Varun Sethi <V.Sethi@nxp.com>,
Sahil Malhotra <sahil.malhotra@nxp.com>
Subject: Re: [EXT] Re: [PATCH v18 3/7] firmware: imx: add driver for NXP EdgeLock Enclave
Date: Thu, 21 Aug 2025 15:21:29 +0200 [thread overview]
Message-ID: <20250821132129.hwnnqdagalvxw2uk@pengutronix.de> (raw)
In-Reply-To: <AM9PR04MB8604A636762E81DF9EA9A9B89532A@AM9PR04MB8604.eurprd04.prod.outlook.com>
On 25-08-21, Pankaj Gupta wrote:
>
>
> > On 25-08-06, Pankaj Gupta wrote:
> > > > On 25-07-09, Pankaj Gupta wrote:
> > > > > > Am 30.06.25 um 14:17 schrieb Marco Felsch:
> >
> > ...
> >
> > > > Lockdown: For a verified boot setup you need to burn an eFuse at
> > > > some
> > > point,
> > > > to tell the bootROM to boot only correct verified firmware images.
> > > >
> > > > After this lockdown it's no longer possible to burn eFuses from the
> > > > REE
> > > albeit
> > > > the production line setup still requires the support.
> > > >
> > > Understood. ELE access from both secure and non-secure world is fixed
> > > in Q3 release.
> > > User can be able to modify eFuses via OPTEE.
> >
> > Splitting the read and write between two drivers is even worse.
>
> This could be use-case dependent. Depends on how customer will deploy its
> solution.
I don't get this. You introduce even more segmentation if the read-path
uses another driver than the write-path and if this is optional.
> > Can you please point out why you can't just move the driver parts into the
> > tee? I do see many advantages if only op-tee is used:
>
> The ELE's KEY derivation function takes account of world from where, the
> operations are requested.
> - The key derived from secure world and from non-secure world will be
> different.
Which is correct and no reason for not having an OP-TEE only solution.
> There are different use-case for ELE accesses from both the worlds.
>
> Using OPTEE ELE driver for Linux specific ELE-HSM requests, it will add
> significant overhead.
>
> Usecases like Transparent TLS offload while securing the secrets in HSM,
> would incur additional overhead.
Of course, the ELE communication itself will be faster if Linux
communicates directly with the ELE instead of going through OP-TEE.
But to be honest I don't think that the ELE usage itself is much faster
than using OP-TEE and the ARMv8 Crypto-Extensions.
For the ELE you need to:
- setup the context (incl. the message and all mailbox mechanism)
- wait for the ELE to be accessible (only one ELE, only one
normal-world MU).
- transfered the messages to/from the ELE
- the ELE processing should be equal to the CPU processing time
(Side note: What is the ELE behavior if the secure-world stresses the
ELE? Is there a MU priority so the normal-world MU may get blocked
(never addressed) or are both MUs scheduled in round-robin?)
For OP-TEE you need to:
- setup the context
- switch the CPU mode
- make use of ARMv8 Crypte-Extensions
On i.MX8M, which uses the CAAM (the ELE predecessor), we can verify that
the ARMv8 crypto extensions are much faster than the crypto-engine
itself. Therefore the CAAM is mostly unused.
Are there measurements/application-notes that show that the usage of the
ELE is more performant than using the crypto-extensions?
> IOT-cases where real-time encrypted feed from sensors, will take latency
> hit.
Does the ELE support inline en-/decryption? If not, I don't think so.
The data needs to be read from the CPU first, afterwards it needs to be
prepared for the ELE and transfered to/from the ELE. Also there is just
a single ELE with a single normal-world MU, so you need to handle
concurrent access if there are multiple ELE-users
(sensor+tls-offloading).
If CPU is used, the data still needs to be read from the communication
interface but afterwards doesn't need to be passed to another IP. Also
there are multiple CPUs.
Regards,
Marco
next prev parent reply other threads:[~2025-08-21 13:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 17:20 [PATCH v18 0/7] firmware: imx: driver for NXP secure-enclave Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 1/7] Documentation/firmware: add imx/se to other_interfaces Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 2/7] dt-bindings: arm: fsl: add imx-se-fw binding doc Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 3/7] firmware: imx: add driver for NXP EdgeLock Enclave Pankaj Gupta
2025-06-25 10:55 ` Marco Felsch
2025-06-27 7:11 ` [EXT] " Pankaj Gupta
2025-06-27 8:46 ` Marco Felsch
2025-06-30 10:32 ` Frieder Schrempf
2025-06-30 12:17 ` Marco Felsch
2025-07-01 10:44 ` Frieder Schrempf
2025-07-09 10:18 ` Pankaj Gupta
2025-07-14 9:41 ` Marco Felsch
2025-08-06 12:19 ` Pankaj Gupta
2025-08-06 13:27 ` Marco Felsch
2025-08-21 11:59 ` Pankaj Gupta
2025-08-21 13:21 ` Marco Felsch [this message]
[not found] ` <DU2PR04MB859982BC71F6CB8182EA1F5F9539A@DU2PR04MB8599.eurprd04.prod.outlook.com>
2025-08-29 11:33 ` Varun Sethi
2025-09-03 9:18 ` Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 4/7] firmware: imx: device context dedicated to priv Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 5/7] firmware: drivers: imx: adds miscdev Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 6/7] arm64: dts: imx8ulp: add secure enclave node Pankaj Gupta
2025-06-19 17:20 ` [PATCH v18 7/7] arm64: dts: imx8ulp-evk: add reserved memory property Pankaj Gupta
2025-06-25 10:34 ` [PATCH v18 0/7] firmware: imx: driver for NXP secure-enclave Marco Felsch
2025-08-20 13:49 ` Frieder Schrempf
2025-08-21 9:50 ` Marco Felsch
2025-08-21 9:59 ` Peng Fan
2025-08-21 10:05 ` Marco Felsch
2025-08-21 12:02 ` [EXT] " Pankaj Gupta
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=20250821132129.hwnnqdagalvxw2uk@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=V.Sethi@nxp.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=frank.li@nxp.com \
--cc=frieder.schrempf@kontron.de \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.gupta@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sahil.malhotra@nxp.com \
--cc=shawnguo@kernel.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).