From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 4C9802DC337 for ; Mon, 8 Dec 2025 12:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765198465; cv=none; b=KlNl8OK1O9X/Rx6/pRbfZ5C22YYafa/V1SPZ0MMucD30fSVeBwxwi31FF25L+4145EZsd/3OKqgGs8XkCCAQPl9MPsz1OqzYW1uHUpnrOpwzfA1UR/zZ9wG3uy0MIbvcV8h6IWELKLPF/oDMcDfjkBAYiS4zdEQfJb3kWaT44Z8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765198465; c=relaxed/simple; bh=pDQhjK86M1xYho++WkZfPaylEW7vDcoJhJil9ywH56g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nq2bataI/yNe3NikUsjJHyEQLviCmFJjXLGI2hSc6q9Y2+AYmUaufgF/+v+UQh06V7S6Xa2f3C3LwR/TXDORi1ev6DGCKXe3eZ7N2j7wS4+/PwmG58HZrqKhYJ3Guj5k5C2rYZSA99uZygVJLGm4ANA7QQzfxOlKzQOVNUQkcKU= 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=PBb+1WSw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=BeBVC4sg; arc=none smtp.client-ip=205.220.168.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="PBb+1WSw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="BeBVC4sg" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B88va6U4183941 for ; Mon, 8 Dec 2025 12:54:21 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= f8NW0eaIjc+/bup2mAkhtGsrWNXPoYpo4XqyUD9efLk=; b=PBb+1WSw63YxN4kz y6Zuccu7OaSLyKKqukOrjIbfV0uaBTdNMwdYOssPHT9Bowhd7dYfP97+eZFQ/l1r hfMGjynIEaSLf4ejgJ3LDabAU4WHlZTuRLVVoH6Duy4eFO8tOfwn1CbiCBd1gXqA WQXl8VAHc9XBCDcEzhoQ8BdPmWuAVaodbwUhaiJ9olclmZrOKHdJIhi8wvnNtJ4B a2nAZS46+N+c6EugtznuMuKJ5tEBAq/jPitbGXdKn2hJMtkLLgA8bxs4vJCCHWnm XPRrcAV8k6rMAsrIwUhSHY/PMGE39Pu/AFjt/iGB9ZecBPhHOUScIiB8pmqeg1io PPj43w== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4awume8nyn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 08 Dec 2025 12:54:21 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-b969f3f5bb1so7569303a12.0 for ; Mon, 08 Dec 2025 04:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1765198461; x=1765803261; 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=f8NW0eaIjc+/bup2mAkhtGsrWNXPoYpo4XqyUD9efLk=; b=BeBVC4sg2E4srVVHdUcZMEZiDGjHiOk7aepwqbsrbt7HN90UchL5Eim3lHgkYcaqaI XQNUS3rOZqwbyjGdRI9AUeqEfFJ9kGe1Baxn6SrSPpP4Xjkqa5UmfdGCuscUoWcEWSE1 F5njapuSD3h/w7Wde0tRoGyrhDpOGqt1iDF6H0Tz1sFaEsx5MLX1yZHZu9pOt0Mu6Hty 1vFtN//fQkL06rDWf9QePN8aYnR++RbZA1rUeNlmt5V4ScZxDOk1IKcrAulk5swjWRiS dzl0j35an0JGAAb9SThsIooQAuvrP2suxb+Ga/liRlU7Bo0rRn1x1L9wJjRz2oZlpUUN V2fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765198461; x=1765803261; 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=f8NW0eaIjc+/bup2mAkhtGsrWNXPoYpo4XqyUD9efLk=; b=I9jBWBuBPqWpR14R0Rp579J5E8Of0c+eOLxT+RKPqnia2sN5bn/Jot+ugPlYJkhNiY EbJrXccqpjZ5HfvtXyIUMea4Lc5EMYGXE48TQy/KDsli3dpqnVLY5kGIRcBA1OpArDLp IwJ8zF9c0I4kOmmh9qAJtLbIjYehn9buV5IO8YiMiCS/qHzNO9AFjq2mpFS4r+0iUksu qC3Ijl2SSuJBETKtaIDN4VPV3LX3V4kINVcP2qp3bg9NkEK6o4B9OvvmiyIfhc+FxN2S aMePnD2C/rIVgYdX8Kl8/EpoE4D8X8PnIzx0wbOlyrUwgxOZ1CiVsPzJ/czwzqtA0Qqy zNJg== X-Forwarded-Encrypted: i=1; AJvYcCX5/20e05BFQ9JkSY88jn6zNfYKd7QOuYKbv6ZS78Ecb0U69s5UAfjrNOIi0gia/82N5Q2l9oNxwWVOPzQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwhqKwgTOu0U+/f/hl4S3icByfIBoKivewDzBJcl1nSpDJNsYOT rIs50ywxSWdPg/z2xm1m1m8xLFZLKZ2AtKkhC9FtdLPHiVTrRs3oc/ZzSjWSEgd6uJHz7489duj zJ7awmIQCQ5Hjew5ArTSQd/Ep8M1nbUpBZCX6TLt7mq3wV3EzSeKZQ9bWfyINaRlLuMw= X-Gm-Gg: ASbGncvVS/jSoMbWGiGfCdTskro2iTji9z1i2aPUoPLTKbW+YiaGhtePWpv1tvaWxsS pnRTWfZWJ/G9meOqTS7RHyeAu9FKUbf41kwmF+0NtrlpvaDGkKdca4JlkVNUu6bcBsS3QYP64cT BltTmRk+RaiPDCQAxKAB+pFaPIWCFPopEP/iH4NkAI2+/rNMWKYstmnG/awErUxUE/pPE9ihCM5 nWhKZM8DZtCh1xrzmsBZCLRvn9J0jPRUQbxIg2Qy/VKsMybfwUOYhf76IQHLaJvbHKC3lPgDn6N wDJQEh+c8gYUHOiMLVd7AsO01lP3IBksjDMZCTC0rgtpGqJehFT8SxjM20ISadErla/rJCoJmpt 3XR58yAzyKpseDqPPm0bhjAfWH43vgi0vL2TlhIg= X-Received: by 2002:a05:6a21:3288:b0:334:a11e:6bed with SMTP id adf61e73a8af0-36617e8a4e7mr7819561637.29.1765198460685; Mon, 08 Dec 2025 04:54:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7OUkYAdQN7i8QZ9P5DCVYGpdvwsmAM8jPa2jw2GtZJTdd1JqInCFhs2mSHfHefLyYpmevhA== X-Received: by 2002:a05:6a21:3288:b0:334:a11e:6bed with SMTP id adf61e73a8af0-36617e8a4e7mr7819539637.29.1765198460150; Mon, 08 Dec 2025 04:54:20 -0800 (PST) Received: from [10.217.223.121] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-bf748c6bcacsm11868865a12.0.2025.12.08.04.54.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Dec 2025 04:54:19 -0800 (PST) Message-ID: <2c0d09b7-0d8c-4bf2-a1bd-1dc4b58cd0a8@oss.qualcomm.com> Date: Mon, 8 Dec 2025 18:24:15 +0530 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: Sumit Garg , Amirreza Zarrabi , 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> Content-Language: en-US From: Harshal Dev In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjA4MDEwOSBTYWx0ZWRfX9LmP45EDNlYI N5JZf5p9u26RNWx4h3ElQ6ni4qDXVAxZ72Tw7/MOPRV57hj+3vzTKYrMcPvO2RwFqjeyvCWqSR/ QjuJMwidS1qG0Eq4COQDhh4o9IGJwq/VKWnOzYmOBNZmPPuZeTcVDbKYq2+6jViQFdUCBiiRxeb w0ZDowMCDJH1j6dtiU0uNwwUwxjN/dpZBfNYo0tFDtzbzKaKWHkiWtmmKvlLiFiMqfSAgRTjU+3 8LAxAmqBzkeWne7p51a/7XnKU33ZUJ7wJpYv43TeWkMA2lih2i74zlLO0Sk1oNoxtbCmP1R0OZv adxpzNkezCamk6CiY96thrZgFSRlvj1Er08+Cv2gQT8gam1zT88cwTjzGM0Vwja7knUIpEleN9W +VZCBbAHvNsCYEBDI/58DN2C0kq3aQ== X-Proofpoint-GUID: Dk76H2LbqZ3rM_qX7PVH7WoEPbifHw9c X-Proofpoint-ORIG-GUID: Dk76H2LbqZ3rM_qX7PVH7WoEPbifHw9c X-Authority-Analysis: v=2.4 cv=SvadKfO0 c=1 sm=1 tr=0 ts=6936ca7d cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=tbvlgjoc70kLmXw65C8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 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-06_02,2025-12-04_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 adultscore=0 suspectscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512080109 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. Regards, Harshal > -Sumit > > [...]