From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 428F118B0A for ; Tue, 9 Dec 2025 03:54:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765252462; cv=none; b=WHb0t7KxvuTV6Igafd3wLlkDGLU13uhNJo7S44AJIyPl8M1P6gMSrsN3vlmMtR9WnArXKch82epwP90sd9ibuetQo+6BONNNhRyFniYhYEdISunVsmHPiNA4+7cgd8dvbIW2/ThCDYQSUbIIIdPbHpw+m5dJ/ChZq+m+fZ/Gm/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765252462; c=relaxed/simple; bh=KhvI48b1jWYAbXcrGPFaQav55PVoEDbZXTcjZpRJECQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kWlR0xHlvefq/D3rrJkwf7lt6uySRvI5Y78snw1NuNW0FSwffjzhEs9usR+G9SDUFEzxSO4Amtm3+YV4eSjy5kYm/6PVVE78m+AJRfQTyf9MK5EKfOWCvvWkzatiaH1BtUTGNNXx8pfbuJBzHJAbfPCUSgjcmpJpTLx+EchIwBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QVIFV7jo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Rme7etL7; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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) header.d=qualcomm.com header.i=@qualcomm.com header.b="QVIFV7jo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Rme7etL7" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B8NXCoh2618902 for ; Tue, 9 Dec 2025 03:54:20 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= nnR1xWyFVLfFlT3ZIJffxXiMjmUP6mdMumapN+NQlmA=; b=QVIFV7joPgay0TbZ oD4cJET1Go0l1Y8+OeGfQvBXa8WGPkK/z66uNrTiSCJNX0rC2ykidA4gvJB6vQcK UyOWr1xSMNLQnnAhadUOvejc0T/0+N0r/LDNOv9DZtl8hfCIU93G7o1YAGP76OrW Rsqcn3zoLtlfQ1NQKHHyMDgwqkHpJgjz0AeOa49FrJ1cs7hmn/UdL8mzyDPCOm6v hI0nTyRXa72hhEXaLvC9kxqrWc01ZXOBJWeMKURoO7+uk1zJ4jNm1ApQn2o+sPIx sNb3bPLroOwark0WZZyCOQfAguh8jOT72vMqiAc5y5BAbYMhBVhCsutxBUrvY0UL bj7okg== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ax76u0tmq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 09 Dec 2025 03:54:19 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-340bc4ef67fso5695060a91.3 for ; Mon, 08 Dec 2025 19:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1765252458; x=1765857258; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nnR1xWyFVLfFlT3ZIJffxXiMjmUP6mdMumapN+NQlmA=; b=Rme7etL7aoZAjAQaNbFDaBIDU+Mm7pNKO1IZyD4Oic/1Z7+6AbRZXymtzSQIdzdjOq 9M6DSwg5Aftqh6Z1mQ0mB6Piqfcu0wBhCvRej+KHt+WtEhrYwvoPL6IIexYquRICit1k 5T/sdaGgkKvtA9hmim8sNTMSduovF4dTTT7UBxO5Bb66D51LRVkXgJGtP2cqDpsOVEOO GC1yGCUmyN/jab1Wb3FmWQpv/6wFTP1A/xFI7zXt95/5M/779rvBTVeB5AgyOdCslbZc TFjoLHSgPBb214KpC8Ujn5RWea1uZjRmRTGJ8zHeyjExgaG7ED6FqjToDtmkDij6KxG5 JGZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765252458; x=1765857258; h=content-transfer-encoding:in-reply-to: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; bh=nnR1xWyFVLfFlT3ZIJffxXiMjmUP6mdMumapN+NQlmA=; b=pQAd7Gta7AkyB6rj5/FXnEoSvMZ4S1a+VIWNUsPkHh5eJUctb0srIa0zGATJAnJhBC Y4aAvGCqiBYCnT5THVj66VOUnZp6zaB/ekuJ7zsqXAxd4uChd0k55Ehr2l+RO26Pe1ge RfD7voFSzU7e2FEBsIoqvqEZReZQbwgVToFg4o7qOrlrG/C5fTJjccwhm+eke/JhaxVs m8biFN0SUBE9SUmK63YXpyBuOeky612Vhl5g67vXO2RhCV0cU+0akeJH7rS12vmKoY1u yu2GUwu5hFNLkz5kKPYXrMGS/+vTc+7YLKPsm1TrZszOApOCqXuZlnxWkzkeaF8prRgT LKtQ== X-Forwarded-Encrypted: i=1; AJvYcCUYBQ8vj1D+26n1mwrqjOse+T6ypvgIMwi+LorA40GKLmNBgtmj2Tbte8r08P3u/BuDXzrzinOoYA+8qU8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywp7pVUeVe4nY/xCX7J8VOOKL5sH/o0Ba2sRMZZdbD9Fr3P1u15 iUyBnQ75x0VwCZtL+wIs2Y/LUU/BYnzWhN8NpBe1XgDqIc5YI926hoa0z0qmbGzhPPtusrVFcbs cliOXnoicOO9mtqpw781wuDXrc8HB0MbZH2NWFdzwAcTP7gNLqaASPeobVtmzGeKpDpa6J4BI/g == X-Gm-Gg: ASbGncu2X7hmmXXa88ZJSaa56C5Udr4mktMZ8LIJITnS3KeZ4L5HqOaHz3L3R/GgNeX 4TDNiBaSQ5Qncbe3UW7468B6kRnB9CxSHYwF6SMODNFyNGIRYlqhzgiKt9Wk0WzYfLlal+JgqFf Z2WZo7qdx80ly1WjW79tlGF8bHzig1hWAJTkpkyNTZ7Mxnn8rPRAp8fSNAxNqxAFogGxMW7rpY9 5aEaSWw3qRiViR1VCaFXl/Mhhq5PSuEBPJYFbsadRQJvBO1FRDZTGOiyr0vZwPiarV0G6wjqMoH P1gqyR06qKtoT+igViafVFWRsJ4zG4Yf1otK7rcTPfpdBqBFmdJIPau/8Xq0ogHOZ0MiKALD/Zo phqaLn6ty7slZoaoA8duzvG0uEvc17xuKOFt5Dn7VgDq6Fvg8ISGtUDwboz1iMRKaHbKyILROZT aQ7yNI2m8= X-Received: by 2002:a17:90a:fc47:b0:343:d70e:bef0 with SMTP id 98e67ed59e1d1-349a267fbc8mr8392223a91.21.1765252458452; Mon, 08 Dec 2025 19:54:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBtCRRfRZPsiM51E+rJcLK4CAWy+MDqSOd14fLOVvOPDgFDBD4Poe8H4k0y2eRJlIFNllCOA== X-Received: by 2002:a17:90a:fc47:b0:343:d70e:bef0 with SMTP id 98e67ed59e1d1-349a267fbc8mr8392201a91.21.1765252457977; Mon, 08 Dec 2025 19:54:17 -0800 (PST) Received: from [192.168.0.74] (n1-41-240-65.bla22.nsw.optusnet.com.au. [1.41.240.65]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-34a48dd5229sm747017a91.0.2025.12.08.19.54.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Dec 2025 19:54:17 -0800 (PST) Message-ID: <3aacf997-3a21-4e4b-b6bd-c55c36fb4c74@oss.qualcomm.com> Date: Tue, 9 Dec 2025 14:54:09 +1100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tee: fix tee_ioctl_object_invoke_arg padding To: Harshal Dev , Sumit Garg , Arnd Bergmann , Jens Wiklander Cc: Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sumit Garg , Alexandre Ghiti , Etienne Carriere , Randy Dunlap , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org References: <20251204101730.1036671-1-arnd@kernel.org> <0b061075-ab71-4ac1-93ec-438ddaaec903@oss.qualcomm.com> <2c0d09b7-0d8c-4bf2-a1bd-1dc4b58cd0a8@oss.qualcomm.com> Content-Language: en-US From: Amirreza Zarrabi In-Reply-To: <2c0d09b7-0d8c-4bf2-a1bd-1dc4b58cd0a8@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjA5MDAyNyBTYWx0ZWRfX5iM7i6ccCyIh 1nflXCjTUEgRdMBIqRM6zxvzsqCQFG8np8fOxidFnQRAPNlUq4/U1FrJ10cV3XJI387M+VR73eY i56jfb/JLtgV3XuymnBo6W6D+VRXRYjdK/BihkRra/QOxB6lzOahfZDMZc5f2Qs96ArsgrqWETI 3s1POT2kMrUgkjgbu4bW0xwqZbFi1H+dQudAlZGMk12Td3xbXy8RAuKo/EHzLniniiiiaLF/Tym AKpxIbfNQn0ZJtYt07srlzYQy2vIyD2TaODaF9UuEj6EUxafeCH/6vGlQJlh4N1nhEgI1avQxSB eoPYIOGRuZngVj6RAe9iijVgSPgIiI9vJU5rzkL9c8qVVe3v58rOV6aSfJem8/MUhYWSwC1PE6f kBlvtWcBaF61djS+qLZ8hBAHSBjfGg== X-Proofpoint-ORIG-GUID: ygK0CZcWMFuBog5pZuCpfdU9aRzqW1p7 X-Authority-Analysis: v=2.4 cv=PYTyRyhd c=1 sm=1 tr=0 ts=69379d6b cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=hi51d+lTLNy/RbqRqnOomQ==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=PgFiUajCvCRNKxe-32EA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: ygK0CZcWMFuBog5pZuCpfdU9aRzqW1p7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-08_07,2025-12-04_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 suspectscore=0 spamscore=0 impostorscore=0 bulkscore=0 clxscore=1015 adultscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512090027 Hi, On 12/8/2025 11:54 PM, Harshal Dev wrote: > > > On 12/8/2025 5:50 PM, Sumit Garg via OP-TEE wrote: >> On Mon, Dec 08, 2025 at 04:24:17PM +1100, Amirreza Zarrabi wrote: >>> Hi, >>> >>> On 12/5/2025 12:27 AM, Jens Wiklander wrote: >>>> Hi, >>>> >>>> On Thu, Dec 4, 2025 at 11:17 AM Arnd Bergmann wrote: >>>>> >>>>> From: Arnd Bergmann >>>>> >>>>> The tee_ioctl_object_invoke_arg structure has padding on some >>>>> architectures but not on x86-32 and a few others: >>>>> >>>>> include/linux/tee.h:474:32: error: padding struct to align 'params' [-Werror=padded] >>>>> >>>>> I expect that all current users of this are on architectures that do >>>>> have implicit padding here (arm64, arm, x86, riscv), so make the padding >>>>> explicit in order to avoid surprises if this later gets used elsewhere. >>>>> >>>>> Fixes: d5b8b0fa1775 ("tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF") >>>>> Signed-off-by: Arnd Bergmann >>>>> --- >>>>> The new interface showed up in 6.18, but I only came across this after >>>>> that was released. Changing it now is technically an ABI change on >>>>> architectures with unusual padding rules, so please consider carefully >>>>> whether we want to do it this way or not. >>>>> >>>>> Working around the ABI differences without an ABI change is possible, >>>>> but adds a lot of complexity for compat handling. >>>> >>>> This is currently only used by the recently introduced qcomtee backend >>>> driver. So it's only used on a few arm64 Qualcomm platforms right now. >>>> >>>> I think we should take this patch, but let's hear what others think. >> >> Yeah since it's not an ABI issue on arm64 platforms where QTEE runs, so: >> >> Reviewed-by: Sumit Garg >> >>>> >>>> Thanks, >>>> Jens >>>> >>> >>> I agree. We should take this patch. As noted, there are not many >>> clients relying on it yet, so updating the userspace should >>> be straightforward. >> >> You should rather test without any userspace library update to test it's >> not an ABI issue. Just for correctness sake, you can update the library >> too. >> > > I'll take the time to test it at some point this week both with and without updating > the library ABI. > Summit, that was the plan from the beginning, that's why I did not add "Reviewed-by:" in the first place. Thanks Harshal for volunteering. Best regards, Amir > Regards, > Harshal > >> -Sumit >> >> [...] >