]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: uapi: Use __u128 instead of __uint128_t in UAPI headers
authorWill Deacon <will@kernel.org>
Fri, 26 Jun 2026 14:17:29 +0000 (15:17 +0100)
committerWill Deacon <will@kernel.org>
Tue, 21 Jul 2026 21:53:02 +0000 (21:53 +0000)
The arm64 UAPI exposes '__uint128_t' types in the members of
'struct user_fpsimd_state', 'struct user_pac_address_keys' and in the
signal frame via 'struct fpsimd_context'. Since the alignment of such
a type appears to be non-portable (16 bytes on arm64, 8 bytes on s390),
prefer the '__u128' typedef from uapi/linux/types.h, which makes the
alignment explicit and allows the definitions to be reused by other
host architectures.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
Cc: Steffen Eiden <seiden@linux.ibm.com>
Cc: Andreas Grapentin <gra@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/uapi/asm/ptrace.h
arch/arm64/include/uapi/asm/sigcontext.h

index 6fed93fb2536fedab22ffd56787a07ebd2a16ea7..15649a253a579675314dcbaef30703010810a302 100644 (file)
@@ -93,7 +93,7 @@ struct user_pt_regs {
 };
 
 struct user_fpsimd_state {
-       __uint128_t     vregs[32];
+       __u128          vregs[32];
        __u32           fpsr;
        __u32           fpcr;
        __u32           __reserved[2];
@@ -258,14 +258,14 @@ struct user_pac_mask {
 /* pointer authentication keys (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS) */
 
 struct user_pac_address_keys {
-       __uint128_t     apiakey;
-       __uint128_t     apibkey;
-       __uint128_t     apdakey;
-       __uint128_t     apdbkey;
+       __u128  apiakey;
+       __u128  apibkey;
+       __u128  apdakey;
+       __u128  apdbkey;
 };
 
 struct user_pac_generic_keys {
-       __uint128_t     apgakey;
+       __u128  apgakey;
 };
 
 /* ZA state (NT_ARM_ZA) */
index e29bf3e2d0ccd275006a52dd5f7146105dcdbf9c..d250ca7a1d464ee9a6a21ea398bce66f027de896 100644 (file)
@@ -78,7 +78,7 @@ struct fpsimd_context {
        struct _aarch64_ctx head;
        __u32 fpsr;
        __u32 fpcr;
-       __uint128_t vregs[32];
+       __u128 vregs[32];
 };
 
 /*
@@ -266,8 +266,8 @@ struct gcs_context {
  *     -       ----                            -----------
  *     REGS                                    the entire SVE context
  *
- *     ZREGS   __uint128_t[SVE_NUM_ZREGS][vq]  all Z-registers
- *     ZREG    __uint128_t[vq]                 individual Z-register Zn
+ *     ZREGS   __u128[SVE_NUM_ZREGS][vq]       all Z-registers
+ *     ZREG    __u128[vq]                      individual Z-register Zn
  *
  *     PREGS   uint16_t[SVE_NUM_PREGS][vq]     all P-registers
  *     PREG    uint16_t[vq]                    individual P-register Pn