From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794829146; b=CZNrMgOMLFMv9d8arwNWdW96M6aspd618GGrIleOtylBr8dRL8Y6/k3fS0Vch1nsS1rI 0ZswYUwFrUG/cGeEsehJFXXj/unmUYkNwj9YGIEJC5uAJcQ7xKVB5uP03ZGN1mNxcOcy7 LmXqW2LDFi+FOrQuO7PBNqsHnoM5PiG7lkNwwne1/N6D5S1UVKhCYoRincrIMCbQtBBW/ 4D6c+BhWp3bPnf1TwZBzU1UT53BZKD+PXIZh53dIE0ejcq9hGKZodMuJbaMrJD4VcKIW4 5QvRBDqFKkUiyI2vJZvP8fWhLwUazlNxxxsPxcQakOCyLKj+AStnV+N9kJ5wtCBlS6Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794829146; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:Organization:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=ajrBayh+hf9TzW6sC/OulW/Cwr8R6pJ38qBUt0Xogo4=; b=m6UNCkMFQW3M5x/xwtBSRLcDB4Du/IE3SQxAfN9Hw+unlAtquf8cASeVeV+3YsUGntE2 tr4xsFosgTgDroI5B0IlIK423cjdkGamy0/O4x8UWfnzf2xLJp7UNSNMHvWSg56abaS+y pdFkjZzPxUgi7GOmfdobq3OsJz1gvalURv8f7ZtgGQUh3OwicVSWsqSKhFqqlDGKTiGCQ 9jRWfp+aoDWQ40e4PH9Bkihu3E6Va3ny+ySeb4/SsWM3MvYqX7/sXOKYqq9b8Bt3otmU1 hoAIZ6wmgM+SYhrs0Yewpb6QD1MvrIvUH40tKmKxZifesvWCNrIjGg0asuo3YZtl/AQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=mYu6QDao; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b="V/sT3GMV"; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88D43606A323 for ; Mon, 16 Nov 2026 11:39:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 88D43606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=mYu6QDao; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=V/sT3GMV Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AGBM9Pp1017816 for ; Mon, 16 Nov 2026 11:39:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ajrBayh+hf9TzW6sC/OulW/Cwr8R6pJ38qBUt0Xogo4=; b=mYu6QDao5NgEwxmp kQ895IHZ4WAirpwoQZRtpAlEV363O3v8ydCIrYrkRvtPejSH85A2wDKYPOE6ulRl jYkkrbsddVvpBo2sgKZWD4s6Ppz1tug3BT9GPInX63LcavJI736NmEGw+vDTfTx4 zbDobSygfNsdcRW5yaYMfugREWxwp0P/GX4HmFqPKHTqljgXn6mNVl1tdtagdCe9 3OCPikboIAUzdMLio9ZZ7eerFvFNq4P6xJ3aV6LlzSNblvCJabBSFhrBneJz1A5Q L/h7B+D9WLSoUMuGHl2O9OK8vnZn7JN2Yk9JOuQB6E4MqxKmX8kVChC0yO7uVlPs wTi94g== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j0003g8qx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 16 Nov 2026 11:39:04 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-3b07b06027eso4402112a91.0 for ; Mon, 16 Nov 2026 03:39:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794829143; x=1795433943; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:organization :from:content-language:references:cc:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to:content-type; bh=ajrBayh+hf9TzW6sC/OulW/Cwr8R6pJ38qBUt0Xogo4=; b=V/sT3GMVr3QURT3MHZPEeHQHt/LwMDK068LxuSYmDf9+7dzMNtIOdJf+eEZ88U9E9C Z8Sgtj28SpTvEtgwXVkhU1WdC75SXfVUlU8ACm0hZSoXB9Tn2D4kg6VgxSwvAJHEovl4 ESguV6ywuNThGKL++uI6bQo+XfEGMxrt2HChaxANM34/OPXiSqt5VwRIN8AtTOysSFG/ 6F2vVEIsxhh8gpCvsenh5k6uXWq+Rm+cTiiwyoQCP8tcJ2NOFSOHHFAKGL81PCcXuXlw 74jsdoKyVcs6EolRL4GT0dN6MjGEX9Qd2X4MlkiDZrHqnIUBSskDaQGhCVmGFzXEXJpy yoVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794829143; x=1795433943; h=content-transfer-encoding:content-type:in-reply-to:organization :from:content-language:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=ajrBayh+hf9TzW6sC/OulW/Cwr8R6pJ38qBUt0Xogo4=; b=1sOYHx6m+2Z05VeouDniJ5DTEN8Ge5WeKOwK58eCWov3h6+9/DwJM1qK2TzByf2b4k 4HOSYxzDz4Y2erWvA0WjABwDKJzzIxD44MQ3RbaDglQPATiwL0imyZ//gYyxCDiAoWbk MS5Ng7PAnSZbIIOIxL9nL+JaICf/9sN2q/VZMp6qSK1EEowcMmn8+u/opgfkvcNeFBKh aAtBQakA+nQ9lUyWRimc/w04chUqWXUenIWfTKgCAGvwMRdRgG20bZHtaCOMfywNdjZS /xu/5fxdIVovBXzOucUCrXFNAeVpatEM4l2Qlqf04eQ10dNx8sMfOH8GE/ZSEejH+avw ouyg== X-Forwarded-Encrypted: i=1; AL+hErFQxYGYeAuIVsqe+SPUGPaaIdu+FculonVoCcEuUE0Cft90VCSiLq4/hltuf8R6bLb7nubnhXfgK3B0Xfc=@vger.kernel.org X-Gm-Message-State: APuU4Z8RGj1AlHz4G0bxrv2jJaoYD1CkwYj7uGLYWK045JsFYiFodOEY XqmfvCHizYMZnxVfGa2FMEnwyH0qmqpdxId5lbEoCte+Nz7A6zyYPBCyAu4XB4gYOllVggcErtD XgTfNBaPthu/4sAO2k6o+v7ycKsnC+OKsELeGeWK+W+S6idbsjiiO/eZA2mMAzd3a5Wg= X-Gm-Gg: AZFdTZerOXT3aVyqgott0e0oMeXHqamA6mmS9pmp8kwCNeW0iumJ/Zx0ZZTm/EFVfOA mrDdP4NuYfDTOMrXwpdVqfuIm1s5IEM/nix51l7cSRo54fF9Q0ZtczlW42opKKoVlM7Oi1aa/X+ r9kih2qq/pr4WaqWE8aWMUgVX3B7cT1Me9ZMtqgbyPi81KMMk/20hQitXg3XcOKEtQzhkY/k7DV FAVzc0QJd4Vg8F8bsIXwqIYX+9QNSx2mLAxdMXxNVTJWekJnElGVVQH5ZCW/kdgnHOFwGY0iSXI H3ZOGEWzMyK4mIg570VxYaVWTcf7LCutsdT9lTjn+a9Lk3cnxadH4Q9o0cuURI+yRWrBfVpqV8k IgqztGIC+GxGSG6Ty16GB+7opQ+TCm6pVNH4BAB+ONK1ku5qqGQVyoG/fa8D1qPnXFFpDWiGUeY M= X-Received: by 2002:a17:90b:3d87:b0:3ab:2737:3395 with SMTP id 98e67ed59e1d1-3b1b0a3a2f9mr9515854a91.42.1794829143173; Mon, 16 Nov 2026 03:39:03 -0800 (PST) X-Received: by 2002:a17:90b:3d87:b0:3ab:2737:3395 with SMTP id 98e67ed59e1d1-3b1b0a3a2f9mr9515833a91.42.1794829142718; Mon, 16 Nov 2026 03:39:02 -0800 (PST) Received: from [10.218.26.96] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b1aeb17042sm16407771a91.6.2026.11.16.03.38.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2026 03:39:02 -0800 (PST) Message-ID: <41eb56c7-b1c4-4077-9778-a31a91002511@oss.qualcomm.com> Date: Mon, 16 Nov 2026 17:08:56 +0530 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/6] tee: optee: Register TEE devices on the platform bus To: Eric Biggers Cc: Bjorn Andersson , Konrad Dybcio , Abel Vesa , Kuldeep Singh , Neeraj Soni , Manivannan Sadhasivam , Sumit Garg , Selvam Sathappan Periakaruppan , Basant Kumar , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, op-tee@lists.trustedfirmware.org, Jens Wiklander References: <20261111-ice-migrate-tee-svc-v2-0-29d19f6c92ab@oss.qualcomm.com> <20261111-ice-migrate-tee-svc-v2-4-29d19f6c92ab@oss.qualcomm.com> <20261113215646.GB35210@quark> Content-Language: en-US From: Harshal Dev Organization: Qualcomm In-Reply-To: <20261113215646.GB35210@quark> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: GgwfuiMs4lYQbFsxT3X0d4qRven8nrhF X-Proofpoint-Spam-Info: AW1haW4tMjYxMTE2MDA0NiBTYWx0ZWRfX8bNvyDbkOp6o JaD9eyB3YWl5VSbcONAFwIxqX6Bw7GPi98/bcph7lXo3TX1FhwwPNOI+4X2zbITsm2EF9k2Tzph Eui+/ElAcvj3bdyphs5Dy/OBoIEIS84= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTE2MDA0NiBTYWx0ZWRfX50Y2wzRmHGO1 N4Bx3kG2CokiCqTlFNYMiTLC1KwLZczdlsUbnFEL3HjqMZ+Vepe3AtdSsAVaT/xf5qSu0HG36Px 4hC79mo3OL1BL7yxPR/RFxpYQisy8fRyOHlAC7xjK6KwzTwas+bwCqbcIOBvmjkF6lWaKGA1DfQ GnERPSM5p0hl/EK2pTX28xGilaBh848kPtk5XDjj7ylqojef1sH2+H57vqLl4aTw9yMb/ZPzBmI N9gOdWFr9Pc2tUhPD7g6OWCU6GT/dwInjDSl32lD8v5sybGjVLWOZ+p8agl1xoktKMzxdK1nsPN uqj/X/9Ojb8FQls4tv9uIPjYWoqEVxF2WZtXpitZ9o8yNUijbt58whlixd6FtrVFaed/UrHxH+/ xaYFxIFdE234FLtqJQwXfCnWJfJhYJ5he+M9YYDwd//S5KAEAVFTOsPXvkVQcLofnV2VHlN7oH+ P2Oxd4GSfVLEMkkKfcw== X-Authority-Analysis: v=2.4 cv=Z4N5j3RA c=1 sm=1 tr=0 ts=6afaeb58 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=yq9iaoSgN4BPWgwdfiYA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-ORIG-GUID: GgwfuiMs4lYQbFsxT3X0d4qRven8nrhF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-16_04,2026-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 malwarescore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611160046 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