All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/6] soc: qcom: ice: Add TZ agnostic re-direction functions
@ 2026-11-18 20:52 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-11-18 20:52 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "linux-review patch is more than 7 days old, verify it wasn't already superseded"
:::::: 

BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261111-ice-migrate-tee-svc-v2-1-29d19f6c92ab@oss.qualcomm.com>
References: <20261111-ice-migrate-tee-svc-v2-1-29d19f6c92ab@oss.qualcomm.com>
TO: Harshal Dev <harshal.dev@oss.qualcomm.com>
TO: Eric Biggers <ebiggers@kernel.org>
TO: Bjorn Andersson <andersson@kernel.org>
TO: Konrad Dybcio <konradybcio@kernel.org>
TO: Abel Vesa <abelvesa@kernel.org>
TO: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
TO: Neeraj Soni <neeraj.soni@oss.qualcomm.com>
TO: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
TO: Sumit Garg <sumit.garg@oss.qualcomm.com>
TO: Selvam Sathappan Periakaruppan <selvam.periakaruppan@oss.qualcomm.com>
CC: Basant Kumar <basantk@qti.qualcomm.com>
CC: linux-kernel@vger.kernel.org
CC: linux-arm-msm@vger.kernel.org
CC: linux-crypto@vger.kernel.org
CC: Harshal Dev <harshal.dev@oss.qualcomm.com>

Hi Harshal,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8f7df005a7564bd7ffa75da9c3085d5b996f1e16]

url:    https://github.com/intel-lab-lkp/linux/commits/Harshal-Dev/soc-qcom-ice-Add-TZ-agnostic-re-direction-functions/20261111-194701
base:   8f7df005a7564bd7ffa75da9c3085d5b996f1e16
patch link:    https://lore.kernel.org/r/20261111-ice-migrate-tee-svc-v2-1-29d19f6c92ab%40oss.qualcomm.com
patch subject: [PATCH v2 1/6] soc: qcom: ice: Add TZ agnostic re-direction functions
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20261119/202611190323.Wc1KGP93-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 67ab6538dff0ed2593b90166214d93e992c74905)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261119/202611190323.Wc1KGP93-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202611190323.Wc1KGP93-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/soc/qcom/ice.c:225:5: error: redefinition of 'qcom_ice_tz_ops_register'
     225 | int qcom_ice_tz_ops_register(struct qcom_ice_tz_ops *ops)
         |     ^
   include/soc/qcom/ice.h:79:19: note: previous definition is here
      79 | static inline int qcom_ice_tz_ops_register(struct qcom_ice_tz_ops *__unused)
         |                   ^
>> drivers/soc/qcom/ice.c:237:6: error: redefinition of 'qcom_ice_tz_ops_unregister'
     237 | void qcom_ice_tz_ops_unregister(struct qcom_ice_tz_ops *ops)
         |      ^
   include/soc/qcom/ice.h:85:6: note: previous definition is here
      85 | void qcom_ice_tz_ops_unregister(struct qcom_ice_tz_ops *__unused)
         |      ^
   2 errors generated.


vim +/qcom_ice_tz_ops_register +225 drivers/soc/qcom/ice.c

a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  224  
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11 @225  int qcom_ice_tz_ops_register(struct qcom_ice_tz_ops *ops)
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  226  {
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  227  	if (!qcom_ice_tz_ops_registered())
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  228  		/* Paired with smp_load_acquire() in qcom_ice_tz_ops_registered() */
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  229  		smp_store_release(&ice_tz_ops, ops);
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  230  	else
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  231  		return -EBUSY;
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  232  
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  233  	return 0;
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  234  }
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  235  EXPORT_SYMBOL_GPL(qcom_ice_tz_ops_register);
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  236  
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11 @237  void qcom_ice_tz_ops_unregister(struct qcom_ice_tz_ops *ops)
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  238  {
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  239  	if (READ_ONCE(ice_tz_ops) == ops)
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  240  		/* Paired with smp_load_acquire() in qcom_ice_tz_ops_registered() */
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  241  		smp_store_release(&ice_tz_ops, NULL);
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  242  }
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  243  EXPORT_SYMBOL_GPL(qcom_ice_tz_ops_unregister);
a3b7cfa9a5a3a11 Harshal Dev 2026-11-11  244  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v2 0/6] Add support for a TEE agnostic Inline Crypto Engine service
@ 2026-11-11 14:17 Harshal Dev
  2026-11-11 14:17 ` [PATCH v2 1/6] soc: qcom: ice: Add TZ agnostic re-direction functions Harshal Dev
  0 siblings, 1 reply; 3+ messages in thread
From: Harshal Dev @ 2026-11-11 14:17 UTC (permalink / raw)
  To: Eric Biggers, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
	Kuldeep Singh, Neeraj Soni, Manivannan Sadhasivam, Sumit Garg,
	Selvam Sathappan Periakaruppan
  Cc: Basant Kumar, linux-kernel, linux-arm-msm, linux-crypto,
	Harshal Dev

Qualcomm platforms such as the IQ-9075 EVK now boot with both Qualcomm
Trusted Execution Environment (QTEE) and OP-TEE [1]. However, the Qualcomm
Inline Crypto Engine (ICE) driver currently only makes SCM calls into QTEE.
With the arrival of ICE support on OPTEE [2,3] for Qualcomm platforms,
there is a need for TrustZone (TZ) agnostic APIs which re-direct the call
to the correct TZ at runtime to request programming of the secure interfaces
on the ICE hardware block.
    
This patch series adds such TZ agnostic APIs to the ICE driver for
requesting secure services from either QTEE or OP-TEE depending on whether
an SCM driver back-end or a TEE client driver back-end is registered with
it at runtime. This series is logically similar to the one introduced for
Peripheral Authentication Service (PAS) [3] which was recently merged to
provide a generic PAS service for both QTEE and OP-TEE.

Apart from introducing a TEE bus based client driver for ICE, this series
also adds support for optionally registering a TEE device which represents
a particular TEE (QTEE or OPTEE) on the platform bus to enable drivers such
as ICE which poll on the availability of a TEE interface to be notified.

The ICE driver is an independent platform driver which polls on the
availability of a TEE interface (SCM driver) before checking if the ICE
secure service is supported by QTEE by querying qcom_scm_is_available().
The TEE subsystem currently does not provide any mechanism to notify the
availability of a TEE interface, i.e. whether QCOMTEE or OPTEE have probed.
Without the introduction of such a notification mechanism the ICE driver
would indefinitely defer probe until the OPTEE ICE Pseudo TA becomes available
on the TEE bus implying that for OPTEE builds without the ICE PTA enabled,
the dependent UFS/SDHC storage driver will fail to come online.

The TEE bus based client driver introduced in this series which registers
with the ICE driver has an ABI with OP-TEE that is 1-1 identical with the
SCM driver's ICE ABI with QTEE. This is because both TEEs implement logically
similar drivers with the exception that OP-TEE currently does not have
Hardware Key Manager v2 support and so the inline encryption functionality
with OP-TEE is currently limited to Qualcomm platforms with only Hardware
Key Manager v1.

Validation:
This series has been validated on a LeMans IQ-9075 EVK device by attempting
file system encryption via the fscrypt tool.

Merge Strategy:
All patches in this series except one touch Qualcomm firmware and soc drivers.
Hence, it should go via the QCOM-SoC tree. Request the TEE subsystem maintainers
to provide an Acknowledgement for this.

[1] https://ldts.github.io/qcom-buildroot/index.html
[2] https://github.com/OP-TEE/optee_os/pull/7906 (In review)
[3] https://github.com/OP-TEE/optee_os/pull/8137 (Draft, depends on PR#7906)
[4] https://lore.kernel.org/all/20260702115835.167602-1-sumit.garg@kernel.org/

Signed-off-by: Harshal Dev <harshal.dev@oss.qualcomm.com>
---
Changes in v2:
- Merged the furnctionality of the middleware ICE service into the ICE
  driver as requested by Eric.
- Introduced tee_platform_device_register() to fix the issue of indefinite
  probe defer in the ICE driver when ICE PTA is not enabled in OPTEE as
  pointed out by Eric.
- Fixed type "Psuedo" in ICE TEE back-end commit.
- Fixed space based indentation with tab in ICE back-end Kconfig.
- Ensure tee_shm_get_va() failure is checked and ERR_PTR() returned.
- Validate out_shm size everywhere in qcom_ice_tee.c
- Zero the memory holding the key when TEE invoke call fails.
- Check failure from qcom_ice_tz_ops_register() during probe.
- Cross-check out_size and lt_key_size in qcom_ice_tee_generate_key().
- Always return 0 when qcom_ice_tee_probe() is success.
- Did not collect tags from Abel since significant rework undertaken.
- Link to v1: https://lore.kernel.org/r/20261021-ice-migrate-tee-svc-v1-0-b035be7aab0a@oss.qualcomm.com

---
Harshal Dev (6):
      soc: qcom: ice: Add TZ agnostic re-direction functions
      firmware: qcom_scm: Transition to ICE TZ agnostic operations
      firmware: qcom: Add a TEE bus based ICE back-end
      tee: optee: Register TEE devices on the platform bus
      soc: qcom: ice: Migrate to the TZ agnostic ICE APIs
      firmware: qcom: scm: Drop exported ICE wrapper functions

 MAINTAINERS                                |   8 +
 drivers/firmware/qcom/Kconfig              |   9 +
 drivers/firmware/qcom/Makefile             |   1 +
 drivers/firmware/qcom/qcom_ice_tee.c       | 443 +++++++++++++++++++++++++++++
 drivers/firmware/qcom/qcom_scm.c           |  90 +++---
 drivers/soc/qcom/Kconfig                   |   1 +
 drivers/soc/qcom/ice.c                     | 173 +++++++++--
 drivers/tee/optee/ffa_abi.c                |   8 +
 drivers/tee/optee/smc_abi.c                |   8 +
 drivers/tee/tee_core.c                     |  21 ++
 include/linux/firmware/qcom/qcom_ice_tee.h |  10 +
 include/linux/firmware/qcom/qcom_scm.h     |  20 --
 include/linux/tee_core.h                   |   9 +
 include/soc/qcom/ice.h                     |  56 ++++
 14 files changed, 784 insertions(+), 73 deletions(-)
---
base-commit: 8f7df005a7564bd7ffa75da9c3085d5b996f1e16
change-id: 20261021-ice-migrate-tee-svc-a5cd6959ae36

Best regards,
-- 
Harshal Dev <harshal.dev@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-18 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 20:52 [PATCH v2 1/6] soc: qcom: ice: Add TZ agnostic re-direction functions kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
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:37   ` sashiko-bot

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.