From nobody Sat Feb 14 09:47:45 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 4fCkjj0FMPz6Rch7; Sat, 14 Feb 2026 09:47:53 +0000 (UTC) (envelope-from olce@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fCkjh6qw1z3XZ2; Sat, 14 Feb 2026 09:47:52 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771062473; 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: in-reply-to:in-reply-to:references:references; bh=Jv+rBO0gimk8xfjUosxoqSCDk/QAQrEV/N9gu76+AhA=; b=mUSpoM3xdqPu+MxruI/2MJ7PNaFS3HAvRSkBPlLiyq/4WO60IAYUeyun9iknQw15wnnA4i aPT87xyIcNqOgF3/W+8oCd4Cn1FTsrXQF3n1f6Ep54HwqT+Rkpfqmu+8W68F9V6+5U0N/0 hgbatCttDjR20Ma7CSECZhL4fdzor9Ku55LnA6Rapemehojx2eQSuJ/TpDo5I0ROF437ZD tMe19MSxyXKpXYdmQXPH0TsTfhcd4h/4MY0FJTAYgqITGl58LSIirNnVHF3FLpOldor8KY ETzt6ieA8csL2FM97HkAzE9Qn8Zb6XYE6Z807hezFUP8Bpt8KTzA3VpL6T73Zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771062473; a=rsa-sha256; cv=none; b=CZVTjcJaZdk0XuAoa+MBYUJr2hR3yULHq6V5EQG4i3BvasGqHrGpxp5788kr1MUC1Y3sxz Emjc7G9xZ/vCIvq3jilawHUTX3coM3ecwsSpYZ3QvcE8me0WXBYvm1+SXEaiGmgfSjwA/R 8lnKy93VinfXlVWAiOjgVk+nSI37AtRNnHeSlIZsznrIMnBM4sk6Cq9GmJPjyfD4AZARrv NetvX8Wm8IiE/kp72pUzdm7eXX6dPQ3oC0A/bfRJxgRkkOja8Pyoe72IZUjKbiyMt55dL6 Fvg/aIGcaIqGBrn4ezkj9+hD1IhXBa1bqLie0qiHJyjBiKE7BZWLQt08EQOBlQ== 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=1771062473; 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: in-reply-to:in-reply-to:references:references; bh=Jv+rBO0gimk8xfjUosxoqSCDk/QAQrEV/N9gu76+AhA=; b=p7MAniHrWQjrn71A7MKB2ny5b/CMits9MbIHFtO+UlD1Swy8d7ez10Qei8QkXsK1DMYX/B YVfeLUfpAMjUoiCO1QSLsQeoDmSg8DF9fuw+zzy/5GS4brGa7fLFxING5zhndx5C5zuZZL xpEm7n2ptsxSP0YBrYqADBaqQ8iahqvHjgT7UPU9JNPuu1HWHOtmUWujxSSbMxNKMdHGUI nXqpx1rvMoazO3Uy83qrS+FSO4b8aFoEWyGsebTcrzPbheWb8vLRwihnXzaiE6cmFiadvh e2cV9aEyA0yxckKXGOSEmg3JuZRmDxqeeb95rSxQdl7bfsAyhomPKaX8P/iWsg== Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (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) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fCkjh2Pb2zp8S; Sat, 14 Feb 2026 09:47:52 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 07c4eb506be4 - main - sys/compat/freebsd32: Fix i386 compilation Date: Sat, 14 Feb 2026 10:47:45 +0100 Message-ID: <2406567.sMrx5ctUpN@ravel> In-Reply-To: References: <698fa41b.23016.79a6cf2d@gitrepo.freebsd.org> 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: multipart/signed; boundary="nextPart3341014.ZmR5Pbtf01"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart3341014.ZmR5Pbtf01 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: Konstantin Belousov Date: Sat, 14 Feb 2026 10:47:45 +0100 Message-ID: <2406567.sMrx5ctUpN@ravel> In-Reply-To: MIME-Version: 1.0 > > So this is probably the wrong direction, it is not going to scale. > If it is for i386 kernel, then even more we should just guard its usage > with LP64 (__SIZEOF_LONG__ == 8 in modern parlance). > Trying to make COMPAT32 valid for 32bit host is not sustainable. Yes, that's for i386 kernel compilation. I'm not trying to make the whole of COMPAT_FREEBSD32 valid on 32-bit platforms (that does not make any sense to me). But since there are uses of 'freebsd32.h' unconditionally on all platforms (in 'kern_umtx.c' at least), and since we also check sizes of structures, I think we should at least ensure that 'struct foo32' on a 32-bit arch is type compatible with 'struct foo' on the same arch. And I do not see that as unsustainable, on the contrary, it is very simple to achieve: Have all 'foo32' types boil down to exactly 'foo' on 32-bit architectures, which is what we are supposed to do already for structures by compat' design. 'freebsd32_uint64_t' you introduced typically supports that. That's the why of https://reviews.freebsd.org/D55283, which fixes commit 87632ddf67b0 ("openzfs sys/types32.h: use abi_compat.h for time32_t") where defining 'time32_t' to 'in32_t' for 32-bit architectures appears to have been an arbitrary choice of yours, which in practice by luck does not change the whole size of 'struct ffclock_estimate32' because 'struct bintime32''s one does not change either as even if its field 'sec' was incorrectly sized after you commit (this is what D55283 fixes), the 'frac' one is 64-bit and 64-bit aligned on all non-x86 architectures so its offset in 'struct bintime32' stays the same. So, again, I think the rule of thumb should just be: Type 'foo32' is compatible with 'foo' on 32-bit architectures and has same alignment. That's the only thing that makes sense if 'struct *32' are visible on 32-bit architectures. That does not impair the alternative, which is to remove visibility of all 'struct *32' on 32-bit architectures. If you want to do that, please go ahead. Regards. -- Olivier Certner --nextPart3341014.ZmR5Pbtf01 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmmQRMEACgkQjKEwQJce JifNfA//WzYQdEe6TdYVmwK5P/HZo7+2gInZWj8lPGv0I8n9/pv/ndQNi2p8mSNf IQ2s1Aqe7QOGmzz3ZQV0r6MNtOaN14eXKcBtRnKbB63nSR8JTt/Wr0MtttWWNrZ+ HSZKUcU38K9A0gbO8vksuhaFV9OKe0gYvHfOfYB8Rd0+q5LkJvHK52hTm6dlHQFT svrkJN3JS3vlBjmSM6pCOCjqNLhdYDitEal6u/7nqm3PX02fipcyAjzkUq5Yj20y y0LxztcFTjSxN1nNK2cCSvYhsZwv16wOtfxvwT9Lc/Uz2MRBgJu9HL9T6a9ozKXt gEkvKHIJ60jnznVxeKBleZxGRdw3SbrzpqjIEf1MUqWhUaV+sxnzvOhgJxFGchfc m28pA9YzWKPmbvJPHhp+716RaFiWulSj6k82x4yADNdNTSiRZKHVVOvQHguSJVL8 Rn+VfDf9+9nVlGzGmSD9Cc3QlLtaBzTd01heVXi+XGG5lGiY05EogzPdjkZOU//J l1z5LQcKSizN8UCLKDuqxDcCf5WO398un2btWrCVKuoTEH5EUCaJhzrZZOMv1qO1 jNwC4IBmPRTcnlFVCxS3nTSWsiL7RQ11AmPJT6vsO0BFAK7Q5CTC3XRCO3SsKz+7 FffTfEzHU6tJJofMrUazKcyML181mdBve4cMtP62ssn4FTDY7+Q= =JQ5Z -----END PGP SIGNATURE----- --nextPart3341014.ZmR5Pbtf01--