From nobody Wed Sep 04 23:43:31 2024 X-Original-To: freebsd-hackers@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 4WzfFs5F4zz5Vv4S for ; Wed, 04 Sep 2024 23:43:45 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WzfFs0z8Tz4JnT for ; Wed, 4 Sep 2024 23:43:45 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-xa33.google.com with SMTP id 71dfb90a1353d-500fbacd680so79977e0c.3 for ; Wed, 04 Sep 2024 16:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725493424; x=1726098224; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QGLnYDdLgVWvPt7MKrngIHIgOmnbBGCf4Z9GpyynhtQ=; b=VrXUtDuozL54iU6SEMjjUHZ7N96IaXIS7p34u0gawPAte+mUWT01XfdhEBqpJY5ZnY 4KhSY65tMWP4T/RZ8VxOqL5GA1JPHDK5tfNtVExqNpF8PJk81A7sq7gMTTawAe/UF1lC B0xrWGmiDBjC+gdUWPKStXgJroLz1gpJ6NDixOm8dqT7ZcZXX57FF7NSVBzVhlmpoBnY wsh32iCII7XGTe/pKnJNSFMi4weyS6JT2FYqnyLJi0Y+AbCpXGw8NEKuacTKE9kWnpKC aT8pf/O1vKbO/x+R8UVVz/VLL33lGYrvTjTHebfaq2oVmYYHspYZ4WtLx3rPsJbGF9rF A51g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725493424; x=1726098224; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QGLnYDdLgVWvPt7MKrngIHIgOmnbBGCf4Z9GpyynhtQ=; b=OsM1vkBEE+4ZsRZhTqnMPnGtcSfKTfo3oR01ptWQhxMYmlPZMzbyKl7ygX2rENwrNy XlPt0N8M7i/jAJyuIarQIiUQJUsAOjj4qH8qOCn1sQcqFNX+eWL4RKHNNUm+lJxZTqlh JjkZoMevfW1zE2B7Ck2rMMuENtql1ecOyu5NDk4opBc4BMmNbLO9sn4lJz02uRNo7H8B RLiqKE3H8BSBvwpjEe56xMcIZ/lNlwqYUpljOxp/YZsR1MyYvT7v4Dvv1sARafsZx62+ h5pioCiJ9H3Q27kF8y80SbXQO/TwQmyt3CnyBSg+Qu0C2k2KGR5n/9Wnhl3Vv0JFJXLB LIDw== X-Forwarded-Encrypted: i=1; AJvYcCUJBpNz7QWfEAbcgtygrxil7oZCIpo57xu4+sK3U2IfjGZ4maRh0mXnCwFn/ZcuryjfgHlb/RMBnk5Y8T7mPgk=@freebsd.org X-Gm-Message-State: AOJu0Yyxnm142p28phb5ghjLrlkQeuJZki0r9WF0n7y37cz2qc2LKqXB kJrUgIo7QR1H7+B2rb2EG6LiYLeT0UF/ldkxaYFiQfWlgmYSAdIsnLL9nBw1IHfcxbe4knr5wUz xP+yQ2Ip3gc1439yNrDFdRAdTi3g= X-Google-Smtp-Source: AGHT+IE2LflKbUyCfqcLlPrF4hcZGQGDJcckZeifooFCNwUB4aJpWzQSnHQcAVJRtBt+Z8IigC3fh7a6pjG83tBM1L4= X-Received: by 2002:a05:6122:8cf:b0:4ec:f8e4:e0bf with SMTP id 71dfb90a1353d-4ffe4a5c827mr26015958e0c.2.1725493423604; Wed, 04 Sep 2024 16:43:43 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <0.2.0-final-1725440949.866-0xb4bb20@qmda.emu.st> <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com> <20240904221522.63E0366@slippy.cwsent.com> In-Reply-To: From: Jacques Fourie Date: Wed, 4 Sep 2024 16:43:31 -0700 Message-ID: Subject: Re: Rust: kernel vs user-space To: Konstantin Belousov Cc: Cy Schubert , Jan Knepper , Mark Delany , freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000938d87062153be08" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WzfFs0z8Tz4JnT --000000000000938d87062153be08 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 4, 2024 at 3:41=E2=80=AFPM Konstantin Belousov wrote: > On Wed, Sep 04, 2024 at 03:15:22PM -0700, Cy Schubert wrote: > > In message <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com>, > Jan > > Kneppe > > r writes: > > > D > > > > > > www.dlang.org > > > > The problem with D is data structure definitions need to also be > mirrored > > (duplicated) in D. For example, when 64-bit inodes were implemented D > > failed to build and generate any code. The reason for this was > > ufs/ufs/inode.h now defined 64-bit inodes while the D representation as > > provided by the D language were still 32-bit. I had opened an issue wit= h > > upstream regarding this. To this day they still haven't figured out how > to > > implement 64-bit inodes on newer FreeBSD systems while maintaining > 32-bit > > inode backward compatibility on older FreeBSD systems (as FreeBSD > > implemented this using ifunc). > > Rust is same. It still uses pre-ino64 bindings for both stdlib and libc. > Looking at the Rust libc bindings I see the following: https://github.com/rust-lang/libc/blob/72c40004a3568849055c0bab5c92c9975b4e= b132/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs#L8 https://github.com/rust-lang/libc/blob/72c40004a3568849055c0bab5c92c9975b4e= b132/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs#L5 Seems to have changed to 64 bit for FreeBSD 12 and up? --000000000000938d87062153be08 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Sep 4, 2024 at 3:41=E2=80=AFP= M Konstantin Belousov <kostikbel@= gmail.com> wrote:
On Wed, Sep 04, 2024 a= t 03:15:22PM -0700, Cy Schubert wrote:
> In message <78BC157F-6E30-49C4-931D-9EB539BD0322@d= igitaldaemon.com>, Jan
> Kneppe
> r writes:
> > D
> >
> > www.dlang.org
>
> The problem with D is data structure definitions need to also be mirro= red
> (duplicated) in D. For example, when 64-bit inodes were implemented D =
> failed to build and generate any code. The reason for this was
> ufs/ufs/inode.h now defined 64-bit inodes while the D representation a= s
> provided by the D language were still 32-bit. I had opened an issue wi= th
> upstream regarding this. To this day they still haven't figured ou= t how to
> implement 64-bit inodes on newer FreeBSD systems while maintaining 32-= bit
> inode backward compatibility on older FreeBSD systems (as FreeBSD
> implemented this using ifunc).

Rust is same.=C2=A0 It still uses pre-ino64 bindings for both stdlib and li= bc.

Looking at the Rust libc bindings I= see the following:

--000000000000938d87062153be08--