From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BCDACD98F2 for ; Fri, 19 Jun 2026 13:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=91bj3zbz2/vIKGQJVyNyz451tVNIOSv8Rh2e1TczHs0=; b=KBGPFRRRXMW8w/EUCKemXy09On iQadh0wvIybCXrqfUl6EaH3RVVSMFkykB0khi7UoVoG5grZOBKkDDAuLmHL8hL9ovd8BkRUNYuWgT 9HfmCVqtfNv7gRNUNoTh+0bYUcrD9gLXcawgiZhyDjjiA/2NymnVkLtsFq7jbqwY8Vu1wESOYRx/k t5YBVVui85Vke/+j3ZC4nTJmednW3dFARxrvC/4u60Qpj3WoXF+lE+ZRtUjAUYVysGNjQxE0l4Ss6 Mfq3KOTFe+XVlWUeyxLODVzAKWzRzxpZDXtiujZoOxJvQ6gidX9WPJsi7PBjYV9AtpKqO6WG4V3YC 6E9kbP5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1waYxf-00000002SKd-0Hl2; Fri, 19 Jun 2026 13:08:43 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1waYxe-00000002SKT-2wWE for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2026 13:08:42 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 3C20A4394F; Fri, 19 Jun 2026 13:08:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 193241F000E9; Fri, 19 Jun 2026 13:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781874522; bh=91bj3zbz2/vIKGQJVyNyz451tVNIOSv8Rh2e1TczHs0=; h=From:To:Cc:Subject:Date; b=LMEQ/LitkAcPJUt9hlvxlO4t4Uz9zLcl49SG74+DgSlWEAYKCIWKvl2C2MCGhThkE oIWVZNqCs5Uk0y3xTp0NFIc1jhez4tjIiK4d0QdkNqodhA9s3lzk7X/16uWIhIn/pI 5Vyjg+JaDB/pC9K6MnCDQRAglzAvghPm0E95f5ruoMYDkHomSI3jI0eM4Nc19Pohy3 dE5g3EFzoYAxrIzwPF2Au9f7/5fcr/+Rf9287CMQbugo9QKQCS1tDPZtnL1Ih8fAXZ WCKdHwQ79YsPLdaw1JNQrwe8bC8UM+6dXIplAYnNWRto3KJFkX1VPBnX38I1+Z4+dM yKuLncbgStMaA== From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: Will Deacon , Arnd Bergmann , Nick Desaulniers , Steffen Eiden , Andreas Grapentin , Catalin Marinas , Dave Martin , Mark Rutland , Marc Zyngier Subject: [PATCH] arm64: uapi: Use __u128 instead of __uint128_t in UAPI headers Date: Fri, 19 Jun 2026 14:08:34 +0100 Message-ID: <20260619130835.5678-1-will@kernel.org> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Cc: Nick Desaulniers Cc: Steffen Eiden Cc: Andreas Grapentin Cc: Catalin Marinas Cc: Dave Martin Cc: Mark Rutland Cc: Marc Zyngier Signed-off-by: Will Deacon --- This aims to help a little with the s390/arm64 KVM series at: https://lore.kernel.org/r/20260529155050.2902245-1-seiden@linux.ibm.com by allowing the relevant parts of the arm64 UAPI to be used directly by s390 rather than copied and modified. I think it's a straightforward change, but the only thing that makes me pause for thought is whether there are toolchains out there which accept __uint128_t but not __int128. Then again, if that crops up as an issue we can probably just tweak the typedef we have in uapi/linux/types.h. arch/arm64/include/uapi/asm/ptrace.h | 12 ++++++------ arch/arm64/include/uapi/asm/sigcontext.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index 6fed93fb2536..15649a253a57 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -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) */ diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h index e29bf3e2d0cc..d250ca7a1d46 100644 --- a/arch/arm64/include/uapi/asm/sigcontext.h +++ b/arch/arm64/include/uapi/asm/sigcontext.h @@ -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 -- 2.55.0.rc0.738.g0c8ab3ebcc-goog