From: Arnd Bergmann via OP-TEE <op-tee@lists.trustedfirmware.org>
To: Jens Wiklander <jens.wiklander@linaro.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>,
Sumit Garg <sumit.garg@oss.qualcomm.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Sumit Garg <sumit.garg@kernel.org>,
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: [PATCH] tee: fix tee_ioctl_object_invoke_arg padding
Date: Thu, 4 Dec 2025 11:17:23 +0100 [thread overview]
Message-ID: <20251204101730.1036671-1-arnd@kernel.org> (raw)
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.
---
include/uapi/linux/tee.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h
index cab5cadca8ef..5203977ed35d 100644
--- a/include/uapi/linux/tee.h
+++ b/include/uapi/linux/tee.h
@@ -470,6 +470,7 @@ struct tee_ioctl_object_invoke_arg {
__u32 op;
__u32 ret;
__u32 num_params;
+ __u32 :32;
/* num_params tells the actual number of element in params */
struct tee_ioctl_param params[];
};
--
2.39.5
next reply other threads:[~2025-12-04 10:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 10:17 Arnd Bergmann via OP-TEE [this message]
2025-12-04 13:27 ` [PATCH] tee: fix tee_ioctl_object_invoke_arg padding Jens Wiklander
2025-12-05 13:45 ` Harshal Dev via OP-TEE
2025-12-05 13:56 ` Arnd Bergmann
2025-12-05 14:11 ` Harshal Dev via OP-TEE
2025-12-08 5:24 ` Amirreza Zarrabi via OP-TEE
2025-12-08 12:20 ` Sumit Garg via OP-TEE
2025-12-08 12:54 ` Harshal Dev via OP-TEE
2025-12-09 3:54 ` Amirreza Zarrabi via OP-TEE
2025-12-16 7:48 ` Jens Wiklander
2025-12-16 10:55 ` Harshal Dev via OP-TEE
2025-12-16 13:17 ` 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=20251204101730.1036671-1-arnd@kernel.org \
--to=op-tee@lists.trustedfirmware.org \
--cc=alex@ghiti.fr \
--cc=amirreza.zarrabi@oss.qualcomm.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=etienne.carriere@foss.st.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.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