From nobody Fri Nov 14 01:05:03 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6zSv4KNWz6GZ6h; Fri, 14 Nov 2025 01:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6zSv3gT1z3l78; Fri, 14 Nov 2025 01:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763082303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2KNp2Y4neDizhomOHk6/s8DCXIa3BqmCzAUUYaTLkw=; b=QCTJBfzcX2CZHSO8WSiqtpiUS9+KR2YjxDCCOBqgkiweHKDZhWQaTFo6XDl2Bd5TCOh48h pEIr1b+TN09rTPvkxujaQDH408/sV1/oxswYvRcWX0XnApNxWQlVoIKf2oZnVWvO6aDsH+ seZ9t6s8Qkt7IZMnlkSJEJsePEJiWypVuhV1OrJ2EVzXmjvbf7/GwzhKVjFGgMkR5zx4ht I4deb79zpqfXJ+fbRmo6nWFnde/Vu++FNYFBpHua7wAOOUXIzj8WRLgI70gp7lfU1usVuY H268ilaoc3pPJDZQn4HvVIckVgWrBE2aLhW9zfkBZlyARYc+pa1Lfpy1SfwmCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763082303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2KNp2Y4neDizhomOHk6/s8DCXIa3BqmCzAUUYaTLkw=; b=ahig/1J8FShkYBgLOWY3u0VdLCFJszK2BeEhHpE8G3EUFL23PJSi9azTmwBx0xM5bGVwVF aIwMUpi/++vYAPTd2yGjTClTrjNcmG6hiG8CYNy6Sj1FVZ+xR2I3z6q/GnjiNCitQcTmRz VmdRSqV7Ln6mHTYU46cUd+b3gjsLIfvtce9clGxjxDMYa64Fp92o2MhygBj97UgR5ak8Nj dIWB0fXCcWbcEA8EE4kye70H3EU3iu4eXo7e2lCyUqTnPzGtH6PHzePwgfSi38VpB4vYoD W4+YsaPaDHnCbC5fIc7RTiC8p/zyG6RY1aL5af+jDmx81Gs12hflEpGBX/D9xA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763082303; a=rsa-sha256; cv=none; b=RAjKNj3BovJ+1r0ymiio1/88P8MIxyVXXYQy9IQ/jWufTrFkN2x8fbZ4xy6BidiBm8nOsU cJwDxxNuWPQt9WzvezhmMewBOx78QQGaKpbH+BUSWy3piwV/zNgzhK0VyjmMWdYxcjh+9d 3gJrbVVn9fQ38tSu+pjX/YdQZnaUSY3miXc9fUbg54DVgfKmjIO6Eyf/LCgTuuDB7t4gdQ VWqS6lIIGZYWAJ8L2xGmlUkFWn0SUc4NzrQoUgtYX8KUQks41itrGcgaVsbvrrdJ5IL8sc Z6qrC5zO/c1D/1+HFSWHkisvqqS9ZlD9oZBnoYtaTtDm04i68F5eKqOnSo6D3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6zSv33mFzllS; Fri, 14 Nov 2025 01:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AE153xJ030908; Fri, 14 Nov 2025 01:05:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE153tj030905; Fri, 14 Nov 2025 01:05:03 GMT (envelope-from git) Date: Fri, 14 Nov 2025 01:05:03 GMT Message-Id: <202511140105.5AE153tj030905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 498a4c7f48a3 - stable/14 - aio: fix alignment of struct (o)aiocb32 on non-amd64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 498a4c7f48a33c60b1768b8a6daf519bad84e18d Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=498a4c7f48a33c60b1768b8a6daf519bad84e18d commit 498a4c7f48a33c60b1768b8a6daf519bad84e18d Author: Robert Clausecker AuthorDate: 2025-11-14 00:55:59 +0000 Commit: Robert Clausecker CommitDate: 2025-11-14 01:04:53 +0000 aio: fix alignment of struct (o)aiocb32 on non-amd64 Only i386 has a four-byte alignment for uint64_t, others have eight-byte alignment. This causes the structure to mismatch on armv7 binaries running under aarch64, breaking the aio interface. Fixes: 3858a1f4f501d00000447309aae14029f8133946 Approved by: markj (mentor) Reported by: Mark Millard Discussed with: jrtc27 PR: 290962 MFC after: immediately (for 15.0) (cherry picked from commit f0af21824331648a41b4e5d3323bea9216bcb7e2) --- sys/kern/vfs_aio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 8842d8409e01..75a6a7355eed 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -2778,7 +2778,11 @@ struct __aiocb_private32 { #ifdef COMPAT_FREEBSD6 typedef struct oaiocb32 { int aio_fildes; /* File descriptor */ +#ifdef __amd64__ uint64_t aio_offset __packed; /* File offset for I/O */ +#else + uint64_t aio_offset; /* File offset for I/O */ +#endif uint32_t aio_buf; /* I/O buffer in process space */ uint32_t aio_nbytes; /* Number of bytes for I/O */ struct osigevent32 aio_sigevent; /* Signal to deliver */ @@ -2790,7 +2794,11 @@ typedef struct oaiocb32 { typedef struct aiocb32 { int32_t aio_fildes; /* File descriptor */ +#ifdef __amd64__ uint64_t aio_offset __packed; /* File offset for I/O */ +#else + uint64_t aio_offset; /* File offset for I/O*/ +#endif uint32_t aio_buf; /* I/O buffer in process space */ uint32_t aio_nbytes; /* Number of bytes for I/O */ int __spare__[2];