From nobody Fri Apr 21 22:40:36 2023 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 4Q38cx2w5cz1HFMT for ; Fri, 21 Apr 2023 22:40:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q38cx1HCxz3mc8 for ; Fri, 21 Apr 2023 22:40:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-94f7a0818aeso303849666b.2 for ; Fri, 21 Apr 2023 15:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1682116848; x=1684708848; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PRvxsIKWAnwBBkzv+1sikIYoGex4MtQyaYqu2hR6gLE=; b=ca6EGPbSB1vt/jVaJgULR6mLj8FnMHH7+aGAeODjqNC8MiKZbfciEkIl0JPpEZGwEA hSeBlowZHs3gBmOkTvDAYFjXDgp94z/NJs5QpjMdwwcEU1GLRyPQP8SX/dY8iAd5wtgu mCZJXd5GOue2QfEwOYnu8kO8MB38w66+sv76rmnhwjW2q779ciKBMo4qWEqYDEMaiW7f j5SPYz9plPg8EkvgU447FHJl9RB1kgYSpaG6sm9dYK1NrKUylMSwtKNFDSFVSF/Z/zxR 4+IYLpYhnaxSteFiVKKSRTm29pGnj4Gpp9L80+cn1+H4D35Lp9lOsqz10utLQUMhGiSJ HWXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682116848; x=1684708848; 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=PRvxsIKWAnwBBkzv+1sikIYoGex4MtQyaYqu2hR6gLE=; b=dT7hXEHKjLnpz+GT4D3TRxSKEmXG1WK/9Sl47iV3bSmfil0lTdWp2qyhQfkc3/MJT+ U1CJ/1FR+cGnvQviXNAw4CInqwP8S5x6MUI9BgifWznE6iQIRF2+bi48vADYJdL0R4cR UgzOw6gH7HfmSM6NfStDcGxf06ZJwS7EhBF8PBIcqeJQQ/rRuk4RVlPuGn/9WXz+h/Cy UF9L6WeMd0rZzG0GQCjeVEo6jgrwtOY3aUJFSGU3LckCuZpFYTm4FSB+dTDJnh/vU6vl xo3y8HdJqVdf+e5ex7tM1vJ5m5JYs7YQFPaFutceetT+TLm15blk7dzAqpsvCSnN0jTW akoA== X-Gm-Message-State: AAQBX9dTqn5UCYGsgRgKqc0xW+XgM1hSohkxqa7LRj3SLNhNso21rk0v gh1yB3uTJ4wyQ3PMNkm5ZMJvCUtup41qqY3QxeWdUQ== X-Google-Smtp-Source: AKy350YfOGRxP+BCTuo2Usv+02tiQK+GimeiYnE+mQ/HgvkJvIefjJaT+qM9GnG+cHPEYVcYmd3nFU2VI4UrvUEeuJc= X-Received: by 2002:a17:906:7050:b0:94f:101:1daa with SMTP id r16-20020a170906705000b0094f01011daamr3195178ejj.13.1682116847496; Fri, 21 Apr 2023 15:40:47 -0700 (PDT) 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202304202219.33KMJSY0042283@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 21 Apr 2023 16:40:36 -0600 Message-ID: Subject: Re: git: 559b94a12257 - main - syscall.master: Fix comments To: Brooks Davis Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000002a846005f9e059b7" X-Rspamd-Queue-Id: 4Q38cx1HCxz3mc8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000002a846005f9e059b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 21, 2023 at 10:37=E2=80=AFAM Brooks Davis = wrote: > On Thu, Apr 20, 2023 at 10:19:28PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D559b94a12257807115bf84264936f0d= e2ac3884e > > > > commit 559b94a12257807115bf84264936f0de2ac3884e > > Author: Warner Losh > > AuthorDate: 2023-04-20 22:16:21 +0000 > > Commit: Warner Losh > > CommitDate: 2023-04-20 22:18:02 +0000 > > > > syscall.master: Fix comments > > > > Have more accruate comments. While #if, #else, etc are copied to th= e > > header files, lines that don't start with # are not. And #include > files > > are only output to sysinc (which winds up at the front of > init_sysent.c > > which seems a bit odd). This is all radically undocumented, and > likely > > has drifted somewhat from 4.4BSD and what other systems do (they've > > drifted too, fwiw). > > We probably want to tighten what we do a fair bit with regard to '#' > lines and perhaps make syscalls.master's format more explicit about > what's being copied where. The historic behavior of blindly emitting lin= es > beginning with '#' was there to support manual specification of things > like padding of arguments to achieve 64-bit alignment on non-i386, 32-bit > architectures. I think we should likely remove the support entirely post > 14 > branch (I'd kept it after the compat32 generation code because I was > worried about breaking downstream consumers with custom syscalls, but by > now they have had time to migrate.) > Agreed. The # process is broken now for #ifdef, etc based one what's copied where. I've started shoveling the code from makesyscalls.lua into a series of *.lua files with classes for each item rather than having a huge ball of code that's a hopeless twisty maze that's hard to extend. The goal is to expand the remit of successor to generate tables for truss, and a bunch of things for qemu bsd-user to reduce the tedious and error-prone hand coding. This may also support cheri-on-freebsd, but I'm going to need someone on the CHERI team to work closely with me on this. Since it's all generated, the special needs of cheri can be accommodated more easily and automatically I believe. It would also allow the cheri bsd-user to update past 5.x (as well as FreeBSD's to move on from 3.1). It might also allow some non-threaded non-specialised FooBSD on BarBSD programs to work with tweaks to the generataor (though NetBSD's and OpenBSD's syscall.master contains a lot less metadata than FreeBSD, so that would need to be addressed before this is a non-starter). I'd also like to write syscall.master.9. I've written maybe 30-40% of the new thing based either on cut and paste code, or with a rewrite to simplify. If you are interested, you can get in touch... Warner --0000000000002a846005f9e059b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Apr 21, 2023 at 10:37=E2=80= =AFAM Brooks Davis <brooks@freebsd= .org> wrote:
On Thu, Apr 20, 2023 at 10:19:28PM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D559b94a12257807115bf84264936f0de2ac3884e<= /a>
>
> commit 559b94a12257807115bf84264936f0de2ac3884e
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-04-20 22:16:21 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-04-20 22:18:02 +0000
>
>=C2=A0 =C2=A0 =C2=A0syscall.master: Fix comments
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Have more accruate comments. While #if, #else, etc = are copied to the
>=C2=A0 =C2=A0 =C2=A0header files, lines that don't start with # are= not.=C2=A0 And #include files
>=C2=A0 =C2=A0 =C2=A0are only output to sysinc (which winds up at the fr= ont of init_sysent.c
>=C2=A0 =C2=A0 =C2=A0which seems a bit odd). This is all radically undoc= umented, and likely
>=C2=A0 =C2=A0 =C2=A0has drifted somewhat from 4.4BSD and what other sys= tems do (they've
>=C2=A0 =C2=A0 =C2=A0drifted too, fwiw).

We probably want to tighten what we do a fair bit with regard to '#'= ;
lines and perhaps make syscalls.master's format more explicit about
what's being copied where.=C2=A0 The historic behavior of blindly emitt= ing lines
beginning with '#' was there to support manual specification of thi= ngs
like padding of arguments to achieve 64-bit alignment on non-i386, 32-bit architectures.=C2=A0 I think we should likely remove the support entirely p= ost 14
branch (I'd kept it after the compat32 generation code because I was worried about breaking downstream consumers with custom syscalls, but by now they have had time to migrate.)

generated, the special needs of cheri can be accommodated more easily an= d



=
Warner
--0000000000002a846005f9e059b7--