From: Harshal Dev <harshal.dev@oss.qualcomm.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>,
Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>,
Neeraj Soni <neeraj.soni@oss.qualcomm.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
Sumit Garg <sumit.garg@oss.qualcomm.com>,
Selvam Sathappan Periakaruppan
<selvam.periakaruppan@oss.qualcomm.com>,
Basant Kumar <basantk@qti.qualcomm.com>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-crypto@vger.kernel.org, op-tee@lists.trustedfirmware.org,
Jens Wiklander <jens.wiklander@oss.qualcomm.com>
Subject: Re: [PATCH v2 4/6] tee: optee: Register TEE devices on the platform bus
Date: Mon, 16 Nov 2026 17:08:56 +0530 [thread overview]
Message-ID: <41eb56c7-b1c4-4077-9778-a31a91002511@oss.qualcomm.com> (raw)
In-Reply-To: <20261113215646.GB35210@quark>
Hi Eric,
On 14-11-2026 03:26 am, Eric Biggers wrote:
> On Wed, Nov 11, 2026 at 07:47:04PM +0530, Harshal Dev wrote:
>> module_tee_client_driver(qcom_ice_tee_driver);
> [...]
>> +module_platform_driver(qcom_ice_plat_driver);
>
> So is this a tee_client_driver or is it a platform_driver? It can't be
> both.
>
> This patch feels like a workaround for issues that could be solved by
> folding this driver's functionality into the existing qcom_ice driver.
> Is there any reason why qcom_ice shouldn't just make the OP-TEE calls
> directly?
>
So this is an attempt at solving the problem I described in the commit
message of patch 4/6. Basically, if the ICE driver is built and probed, it
needs to know that:
1. A TZ is available on the Qualcomm platform. (qcom_scm_is_available)
2. Whether the TZ supports an ICE secure service. (qcom_scm_ice_is_available)
With OP-TEE, there is no way actively check via an API for 1 and 2. Instead
the TEE client driver model probes a driver only if the secure service is
supported by OP-TEE. Which means that you only get notified of the presence of
the secure service, not of its absence.
So currently if you boot with OP-TEE and register a back-end ICE TEE client
driver, and the OP-TEE build doesn't support a secure ICE service, the ICE
driver calling a corresponding qcom_tee_is_available() API on the back-end
driver would forever defer probe.
I suggested another approach for this on a reply on commit 4, where we register
the back-end OPTEE device on the TEE bus once it has registered all its secure
services on the TEE bus, and then the ICE TEE client driver can be probed
when that happens, and subsequently attempt a tee_client_open_session() call
to the ICE secure service, failing which it would have concrete knowledge
that the current OP-TEE build doesn't support the ICE service and so we
can continue storage initialization without inline encryption support.
At the core of it, we have two device-tree probed independent drivers, ICE
and OPTEE that need to talk to each other the way ICE and SCM drivers do.
The right approach here needs debate and alignment.
Regards,
Harshal
> - Eric
next prev parent reply other threads:[~2026-11-16 11:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 14:17 [PATCH v2 0/6] Add support for a TEE agnostic Inline Crypto Engine service Harshal Dev
2026-11-11 14:17 ` [PATCH v2 1/6] soc: qcom: ice: Add TZ agnostic re-direction functions Harshal Dev
2026-11-11 14:17 ` [PATCH v2 2/6] firmware: qcom_scm: Transition to ICE TZ agnostic operations Harshal Dev
2026-11-13 21:34 ` Eric Biggers
2026-11-16 11:18 ` Harshal Dev
2026-11-11 14:17 ` [PATCH v2 3/6] firmware: qcom: Add a TEE bus based ICE back-end Harshal Dev
2026-11-11 14:17 ` [PATCH v2 4/6] tee: optee: Register TEE devices on the platform bus Harshal Dev
2026-11-11 14:57 ` Harshal Dev
2026-11-13 20:45 ` Harshal Dev
2026-11-13 21:56 ` Eric Biggers
2026-11-16 11:38 ` Harshal Dev [this message]
2026-11-11 14:17 ` [PATCH v2 5/6] soc: qcom: ice: Migrate to the TZ agnostic ICE APIs Harshal Dev
2026-11-11 14:17 ` [PATCH v2 6/6] firmware: qcom: scm: Drop exported ICE wrapper functions Harshal Dev
2026-11-11 14:21 ` [PATCH v2 0/6] Add support for a TEE agnostic Inline Crypto Engine service Harshal Dev
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=41eb56c7-b1c4-4077-9778-a31a91002511@oss.qualcomm.com \
--to=harshal.dev@oss.qualcomm.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=basantk@qti.qualcomm.com \
--cc=ebiggers@kernel.org \
--cc=jens.wiklander@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=kuldeep.singh@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=neeraj.soni@oss.qualcomm.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=selvam.periakaruppan@oss.qualcomm.com \
--cc=sumit.garg@oss.qualcomm.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 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®