[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9e44024d-a649-49d6-825f-97f2a11e1691@app.fastmail.com>
Date: Fri, 05 Dec 2025 14:56:21 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Harshal Dev" <harshal.dev@....qualcomm.com>,
"Jens Wiklander" <jens.wiklander@...aro.org>,
"Arnd Bergmann" <arnd@...nel.org>
Cc: "Paul Walmsley" <pjw@...nel.org>, "Palmer Dabbelt" <palmer@...belt.com>,
"Albert Ou" <aou@...s.berkeley.edu>,
"Amirreza Zarrabi" <amirreza.zarrabi@....qualcomm.com>,
"Sumit Garg" <sumit.garg@....qualcomm.com>,
"Sumit Garg" <sumit.garg@...nel.org>, "Alexandre Ghiti" <alex@...ti.fr>,
"Etienne Carriere" <etienne.carriere@...s.st.com>,
"Randy Dunlap" <rdunlap@...radead.org>, op-tee@...ts.trustedfirmware.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [PATCH] tee: fix tee_ioctl_object_invoke_arg padding
On Fri, Dec 5, 2025, at 14:45, Harshal Dev wrote:
> On 12/4/2025 6:57 PM, Jens Wiklander wrote:
>> On Thu, Dec 4, 2025 at 11:17 AM Arnd Bergmann <arnd@...nel.org> wrote:
>>
> The only user-space client which is currently using this ABI (as per
> our knowledge)
> is the libqcomtee library:
> https://github.com/quic/quic-teec/blob/main/libqcomtee/src/linux/tee.h#L432
>
> If I understand Arnd's concern correctly, if a compiler used to build
> the user-space
> client skips the padding for tee_ioctl_object_invoke_arg, it could lead
> to issues.
>
> Let's wait for Amir's view here as well, however I do think the
> explicit padding would
> benefit here.
>
The problem is much narrower: as the amount of padding is determined
by the architecture specific ABI, kernel and userspace on the same
architecture always agree, and specifically 32-bit Arm userspace
and 64-bit Arm userspace (aarch64) also have the same rules, so there
is no problem on Qualcomm's platforms even with compat 32-bit userspace.
The only actual ABI problem would happen on 32-bit x86 (i386)
userspace running on a 64-bit x86 kernel, since i386-linux compilers
have different alignment rules from most other architectures.
Arnd
Powered by blists - more mailing lists