From nobody Sun Apr 12 05:57:22 2026 X-Original-To: dev-commits-src-all@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 4ftfvR22D5z6YYvn for ; Sun, 12 Apr 2026 05:57:23 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftfvQ5c3tz3mp4 for ; Sun, 12 Apr 2026 05:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775973442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzmcxj3/yITwvUDHzLzNnTD19DQfFV171+qRyTQjFuM=; b=W5+innSc0mRcpQgwOy8AWCV7wWNQc2ccKra/OI5cUQXaqhWbVT0eAj9PFmNh2QLYoGPSK2 oxyKDOHvR9NlCqE97m53D166z3Y8sI8oJHO4hR3vrbjkWKSRkiIV0TjIRsexr2atYwBiuF 9gJOo4ykssLqXlcbDG9KNIFGZJS4b0fivvciLfFOvZNKHdhEuVa3k152gEdxPRTNmuTWDA veAEBPaXk9gA4X11AW1GTKIYoFp0TecLXjWQkJshCKkW+nvAI8p2DPL1SDt3k6bvTRVtNg 8Hs0KVswwcZo9H4JQY/Oq3WkXio0nqMkZHxKwZBO9FFoRd+h61JGk/cWUFZKEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775973442; a=rsa-sha256; cv=none; b=FMlpbvWAo72Hz+7QiEiC8kjrzZuRVBmN8OhrRIJ/qkn6tEIMil0QHlNFT/HTqaq7MAomZI nZGr6eOaMqgMCVQfsNsxtga1Y5N43urA11ArPo2AiPUoPfeHWqFB/yHDDz4+db/QZnUjBY BUbMlBCI2ApazD43700QJqoaM8h0Q2rn264sFqQ/RRg16yDQKerM+nLpW3jMqcvMGUYipE sT2OzyFjQHi/vj9t3D+7DTiSJuRbh9bBb5ZN2JxlmvqjlbRRozl950QRMV+53Odewxd/tl nwSc7RiNzfGMBx678Ros6LQL3SSLVRCWUX1H7GPLABigLnIuHCDIA0XfEy2oAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775973442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzmcxj3/yITwvUDHzLzNnTD19DQfFV171+qRyTQjFuM=; b=d+KRV+lNQ180330MgaOYvMzW/ZvscgpgfnjWcIK7lkXHKpcoyxOjzlzNS7e6QDX2iMq2+B L8JVVg/fvMvFbbVrciSfiDy3pJ3wXamLo9/pI3B1pihKk66Rsn9XxRZ9vbWyWLufysAlS5 NSlJiDx7viwRh2ZIwlvKQWpXvNiLbUEaFZ5hgka6zyBKknnZozjZfhpI/nlca9xYzXfKdG wT4Xd34Zq5Kar45oFzDQiDqLGLBozo8deDZkV6IB5X2A91Lo2dqaDuUNAl/TrfzXDEKUOh Ri4aKdr2CwO60u8kdIU9qeLwn17yODHJkcANsgO9Ko8b9Wd5dDUmyJTH6mzKqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftfvQ56VZz144W for ; Sun, 12 Apr 2026 05:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30e0f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 05:57:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Olivier Certner From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: de8867882c54 - stable/14 - sys/compat/freebsd32: FF clock struct: Don't pack, use 'ffcounter32' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: de8867882c544bab7de260fbb0504fc8949ca05a Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 05:57:22 +0000 Message-Id: <69db3442.30e0f.1debcea8@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=de8867882c544bab7de260fbb0504fc8949ca05a commit de8867882c544bab7de260fbb0504fc8949ca05a Author: Olivier Certner AuthorDate: 2026-02-13 17:03:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-12 05:56:47 +0000 sys/compat/freebsd32: FF clock struct: Don't pack, use 'ffcounter32' Packing 'struct ffclock_estimate32', in absence of substitution of 'ffcounter' (some 'uint64_t') by a 32-bit compatible type, was necessary on amd64 since 'uint64_t' is 8-byte aligned, which leaves a padding gap of 4-byte between fields 'update_time' and 'update_ffcount'. This gap does not exist on i386 (or amd64 32-bit mode), as 'uint64_t' there is only 4-byte aligned. Change the type of the 'update_ffcount' and 'leapsec_next' fields to the recently introduced 'freebsd32_uint64_t', and adapt copy-in and copy-out accordingly. Using `CP()` previously worked due to the '__packed__' attribute. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55282 (cherry picked from commit 7c2fc4419db43a8a7d1886b0b8e08aa97bfa31e4) --- sys/compat/freebsd32/freebsd32.h | 12 +++++------- sys/compat/freebsd32/freebsd32_misc.c | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index fad52948d492..b6412b1be917 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -57,8 +57,8 @@ struct bintime32 { struct ffclock_estimate32 { struct bintime32 update_time; - ffcounter update_ffcount; - ffcounter leapsec_next; + freebsd32_uint64_t update_ffcount; + freebsd32_uint64_t leapsec_next; freebsd32_uint64_t period; uint32_t errb_abs; uint32_t errb_rate; @@ -66,11 +66,9 @@ struct ffclock_estimate32 { int16_t leapsec_total; int8_t leapsec; int8_t _pad; -} -#if defined(__amd64__) -__attribute__((packed)) -#endif -; +}; +_Static_assert(sizeof(ffcounter) == sizeof(freebsd32_uint64_t), + "'ffcounter' size discrepancy'"); #if defined(__amd64__) || defined(__i386__) _Static_assert(sizeof(struct ffclock_estimate32) == 52, "ffclock_estimate32 size"); #else diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index c3b2b2141e30..9aaca6853859 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -4112,8 +4112,8 @@ freebsd32_ffclock_setestimate(struct thread *td, CP(cest.update_time, cest32.update_time, sec); memcpy(&cest.update_time.frac, &cest32.update_time.frac, sizeof(uint64_t)); - CP(cest, cest32, update_ffcount); - CP(cest, cest32, leapsec_next); + FU64_CP(cest, cest32, update_ffcount); + FU64_CP(cest, cest32, leapsec_next); FU64_CP(cest, cest32, period); CP(cest, cest32, errb_abs); CP(cest, cest32, errb_rate); @@ -4142,8 +4142,8 @@ freebsd32_ffclock_getestimate(struct thread *td, CP(cest32.update_time, cest.update_time, sec); memcpy(&cest32.update_time.frac, &cest.update_time.frac, sizeof(uint64_t)); - CP(cest32, cest, update_ffcount); - CP(cest32, cest, leapsec_next); + FU64_CP(cest32, cest, update_ffcount); + FU64_CP(cest32, cest, leapsec_next); FU64_CP(cest32, cest, period); CP(cest32, cest, errb_abs); CP(cest32, cest, errb_rate);