From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS714 17.58.63.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from st43p00im-zteg10063401.me.com (st43p00im-zteg10063401.me.com [17.58.63.175]) (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) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 02F6A1F461 for ; Sat, 6 Apr 2024 00:43:55 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=icloud.com header.i=@icloud.com header.a=rsa-sha256 header.s=1a1hai header.b=C7Qupa1f; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1712364234; bh=IINS/nw97dDrMhd8CMFanE8i5wBG9D43SPdjPGg/3NI=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=C7Qupa1fu3Og4bvb3tgiNJq8aRYrhdWbB4+7kbq/h/lCs5adMnTnp+Z8iSJtKVRUx v5zLRp2UBCbgzhLLscLbMSQuSIjlXu0Y6dB2bOCAeR48/dDRS6MpS1Sqyb8RSbQstM +IG+ce5hh6e0JUh0OnkYjRFtYel7UGCsr4+x/fWo2zXFMimOxaUPHl6hgO0kn+8wHO uBB9+OQO+CbmLjYpyebWm5+8eVcfaETu8bKTz8Erdseg3ZdP/JTxWskf3lcL7g4TZU E7V4EiDOB2GybFvrkT4kbsgYXCmk4h2YigsMWhMQITDHDY15CT063qsJrXqQKTh3gu f+9zXEVBuajTw== Received: from smtpclient.apple (st43p00im-dlb-asmtp-mailmevip.me.com [17.42.251.41]) by st43p00im-zteg10063401.me.com (Postfix) with ESMTPSA id 6F2F3A80EAA; Sat, 6 Apr 2024 00:43:53 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: [PATCH 2/2] syscall: use pure Perl sendmsg/recvmsg on *BSD From: Gaelan Steele In-Reply-To: <20240129212319.98910-3-e@80x24.org> Date: Sat, 6 Apr 2024 01:43:40 +0100 Cc: meta@public-inbox.org Content-Transfer-Encoding: quoted-printable Message-Id: <0C20FAD1-1983-4C38-BB6C-03D9DEFC0D58@icloud.com> References: <20240129212319.98910-1-e@80x24.org> <20240129212319.98910-3-e@80x24.org> To: Eric Wong X-Mailer: Apple Mail (2.3774.300.61.1.2) X-Proofpoint-ORIG-GUID: 2KzsJhS8WgSjkiLjhlvVuh5g4hxU95w1 X-Proofpoint-GUID: 2KzsJhS8WgSjkiLjhlvVuh5g4hxU95w1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-05_31,2024-04-05_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 clxscore=1011 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 suspectscore=0 bulkscore=0 mlxlogscore=859 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2404060004 List-Id: > On Jan 29, 2024, at 9:23=E2=80=AFPM, Eric Wong wrote: >=20 > While syscall symbols (e.g. SYS_*) have changed on us in FreeBSD > during the history of Sys::Syscall and this project and did bite > us in some cases; the actual numbers don't get recycled for new > syscalls. We're also fortunate that sendmsg and recvmsg syscalls > and associated msghdr and cmsg structs predate the BSD forks and > are compatible across all the BSDs I've tried. >=20 > OpenBSD routes Perl `syscall' through libc; while NetBSD + FreeBSD > document procedures for maintaining backwards compatibility. > It looks like Dragonfly follows FreeBSD, here. >=20 > Tested on i386 OpenBSD, and amd64 {Free,Net,Open,Dragonfly}BSD >=20 > This enables *BSD users to use lei, -cindex and future SCM_RIGHTS-only > features without needing Inline::C. Unfortunately this patch broke public-inbox on Darwin: Bareword "SIZEOF_cmsghdr" not allowed while "strict subs" in use at = /tmp/public-inbox/lib/PublicInbox/Syscall.pm line 456. BEGIN not safe after errors--compilation aborted at = /tmp/public-inbox/lib/PublicInbox/Syscall.pm line 460. Compilation failed in require at /tmp/public-inbox/lib/PublicInbox/DS.pm = line 31. BEGIN failed--compilation aborted at = /tmp/public-inbox/lib/PublicInbox/DS.pm line 32. Compilation failed in require at = /tmp/public-inbox/lib/PublicInbox/Daemon.pm line 17. BEGIN failed--compilation aborted at = /tmp/public-inbox/lib/PublicInbox/Daemon.pm line 17. Compilation failed in require at = /tmp/public-inbox/script/public-inbox-httpd line 7. BEGIN failed--compilation aborted at = /tmp/public-inbox/script/public-inbox-httpd line 7. I=E2=80=99m not enough of a Perl person to fully untangle this. As best I can tell, the intent is that non-Linux/BSD OSes should still work with Inline::C, but this doesn=E2=80=99t work in practice due to a bug? It may also be possible to use the BSD approach on Darwin - Darwin ascribes to the BSD school of thought where libc is the only Officially Stable interface, but if you can get away with it on the real BSDs maybe you can get away with it on fake BSD too. Best wishes, Gaelan=