public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
To: Harshal Dev <harshal.dev@oss.qualcomm.com>,
	Sumit Garg <sumit.garg@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Jens Wiklander <jens.wiklander@linaro.org>
Cc: Arnd Bergmann <arnd@kernel.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Sumit Garg <sumit.garg@oss.qualcomm.com>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Etienne Carriere <etienne.carriere@foss.st.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	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
Date: Tue, 9 Dec 2025 14:54:09 +1100	[thread overview]
Message-ID: <3aacf997-3a21-4e4b-b6bd-c55c36fb4c74@oss.qualcomm.com> (raw)
In-Reply-To: <2c0d09b7-0d8c-4bf2-a1bd-1dc4b58cd0a8@oss.qualcomm.com>

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 <arnd@kernel.org> wrote:
>>>>>
>>>>> From: Arnd Bergmann <arnd@arndb.de>
>>>>>
>>>>> 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 <arnd@arndb.de>
>>>>> ---
>>>>> 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 <sumit.garg@oss.qualcomm.com>
>>
>>>>
>>>> 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
>>
>> [...]
> 


  reply	other threads:[~2025-12-09  3:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 10:17 [PATCH] tee: fix tee_ioctl_object_invoke_arg padding Arnd Bergmann
2025-12-04 13:27 ` Jens Wiklander
2025-12-05 13:45   ` Harshal Dev
2025-12-05 13:56     ` Arnd Bergmann
2025-12-05 14:11       ` Harshal Dev
2025-12-08  5:24   ` Amirreza Zarrabi
2025-12-08 12:20     ` Sumit Garg
2025-12-08 12:54       ` Harshal Dev
2025-12-09  3:54         ` Amirreza Zarrabi [this message]
2025-12-16  7:48           ` Jens Wiklander
2025-12-16 10:55             ` Harshal Dev
2025-12-16 13:17               ` Jens Wiklander
2026-04-27 11:41                 ` Jens Wiklander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3aacf997-3a21-4e4b-b6bd-c55c36fb4c74@oss.qualcomm.com \
    --to=amirreza.zarrabi@oss.qualcomm.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=etienne.carriere@foss.st.com \
    --cc=harshal.dev@oss.qualcomm.com \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sumit.garg@kernel.org \
    --cc=sumit.garg@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox