From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 54F2E25CC79 for ; Mon, 8 Dec 2025 12:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765196466; cv=none; b=EDSCeBTB1BG+HOVn/S3cbZm3PoRhNTOzv8jAD4HWcKUisW3JSiy3Y4cZnTu5u19YklO6Nwt0Y3eWAifdUbCOhmL0mazzQV3L+0Z5mvbuUU3yplEVjruiFITtVI2pi91ZPF8MDE+GtXlD8v4OVQwv2DkXUPsosLQtTDMEyCgXU2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765196466; c=relaxed/simple; bh=MusA/V6Dt1xIa+tAeGx/rsU9JoqhBv1Pt0IFS+iUlt0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sfUOuw9lUQte5D1y1PTygEPkugQdN99dXNxM8NkPjy048806KWPxrj6FvEHnwpBhFFbLL9h0RkL5IQzKCfXrDSaTv1ekVeBphCZfK4cBRg9MjptWuClKJ6NOcBbtO4Ip9+4AF5LKlK/WkShj69Y6F+toiRx80zEPwziS3lsc3qQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I73R2iUT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I73R2iUT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44A17C4CEF1; Mon, 8 Dec 2025 12:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765196465; bh=MusA/V6Dt1xIa+tAeGx/rsU9JoqhBv1Pt0IFS+iUlt0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I73R2iUTYqY+LLPDBJPugFCa+aeAt8i26sfs20t1x+Xv8tnpUQiGCiQ3Zf63BPR/b dHoei1+iKxNo21SQAIGYg8cBzf9y7yC7XLSZo6v9CQYwvvlKyCko32nRs/bkmnK5fd GdYGW+vpgnG3mIOV/VIHzJzk1BVO4QCKaCQ1u7Iw41nJZfFDI6R/Wwj3fw2rHPos4y YD861NKUk6eU0wuuUjbVoa3YQX2U/ORUXDWPbVKqWRdPu5gOHP3lqzjX1iafWM5lrx ulO+BFok/jYE7zvrQXAD7nQlotgjPfQLXMgpYgVohjs9GFM+WVgA7/o3kgwzvCevRZ Up1IopKmhFzcA== Date: Mon, 8 Dec 2025 17:50:59 +0530 From: Sumit Garg To: Amirreza Zarrabi Cc: Jens Wiklander , Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sumit Garg , Arnd Bergmann , Alexandre Ghiti , Etienne Carriere , Randy Dunlap , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH] tee: fix tee_ioctl_object_invoke_arg padding Message-ID: References: <20251204101730.1036671-1-arnd@kernel.org> <0b061075-ab71-4ac1-93ec-438ddaaec903@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0b061075-ab71-4ac1-93ec-438ddaaec903@oss.qualcomm.com> 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. -Sumit [...]