[PATCH] tee: fix tee_ioctl_object_invoke_arg padding
Arnd Bergmann
arnd at kernel.org
Thu Dec 4 02:17:23 PST 2025
From: Arnd Bergmann <arnd at 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 at 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
More information about the linux-riscv
mailing list