From nobody Sat Feb 03 09:04:33 2024 X-Original-To: current@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 4TRmtb6w5bz58yTn for ; Sat, 3 Feb 2024 09:04:55 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRmtb4MLyz4Std; Sat, 3 Feb 2024 09:04:55 +0000 (UTC) (envelope-from dch@skunkwerks.at) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 73B045C00C1; Sat, 3 Feb 2024 04:04:54 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Sat, 03 Feb 2024 04:04:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skunkwerks.at; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1706951094; x=1707037494; bh=fz99druo891jeV/pQmSfMgghfLg1+vL1 COfvynEFkE4=; b=BeLZrkRiPETmEmBZtm8l8gyn0ZcqDavuDhstGv70y6aiGJXU S7UQz38xY4bjlZO7w71MGkNCiuUnzWIhjnco25APpTsFNolr2CWJ5/YnIvaEIvao a1FhqKKWFu6h0CpQynuGZIlt0zs6sI3hKrotSFqU/xjIQ5BCGI8OeXBfh6on8cH2 l3Kgk5D6Es+KXakltTE+M4o+zo7XRFJ44HE2tBuabzQPu09ny147y6Qmv086Jsua 5tLanjbq4wJFHg+ZOX+HoT78Es6grThulRsW6ZuOge9nwsWCrUkthCHg/sz4weAj gfW6oflVl0jOOFaouTw2zWOykDw5LAOJcLAjZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706951094; x= 1707037494; bh=fz99druo891jeV/pQmSfMgghfLg1+vL1COfvynEFkE4=; b=W s5vos9dJLz3cnMVT3UnMo76aRsB7OYncKRGOJfpjp1zck2jafXwI0W//jV1jWfUq o39RlBup5Zq8voAChsCEmPBv6MZHsE4Mjjs9zrO2pCt6LfNfIfNvP15CNFYegAz7 /LkTd022htO+NExvkQhvCFDUmlM4LsscVqjus91hvqcYpkG74GAdg6C4fbSBdxWU G8ASDK/lLtAcNpPn35FWvkSo80u99frNMOyYL2qCLuyDw5qiDGcJMAyH6jbJlWq3 KD9pi4JCoymhPw5FW/5LPjPjQRnbuLMT7ao/YkruWZ6uKprn7Wxg4HLMTB8NzCkR Yk3m9QKdvN6bgGFOVUbwQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeduhedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedf ffgrvhgvucevohhtthhlvghhuhgsvghrfdcuoegutghhsehskhhunhhkfigvrhhkshdrrg htqeenucggtffrrghtthgvrhhnpeffuefgteehteetfeevfefhvdfhgefhvddvheduvdfh gefgffefvedtieffueetveenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhophgvnh gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepuggthhesshhkuhhnkhifvghrkhhsrdgrth X-ME-Proxy: Feedback-ID: ic0e84090:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0E95536A0076; Sat, 3 Feb 2024 04:04:53 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Message-Id: <458c2a3b-1139-4449-a4a9-f23782686dea@app.fastmail.com> In-Reply-To: References: Date: Sat, 03 Feb 2024 10:04:33 +0100 From: "Dave Cottlehuber" To: "Brooks Davis" Cc: current@freebsd.org Subject: Re: libc/libsys split coming soon Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4TRmtb4MLyz4Std 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)[]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] On Fri, 2 Feb 2024, at 23:31, Brooks Davis wrote: > TL;DR: The implementation of system calls is moving to a seperate > library (libsys). No changes are required to existing software (except > to ensure that libsys is present when building custom disk images). > > Code: https://github.com/freebsd/freebsd-src/pull/908 > > After nearly a decade of intermittent work, I'm about to land a series > of patches which moves system calls, vdso support, and libc's parsing = of > the ELF auxiliary argument vector into a separate library (libsys). I > plan to do this early next week (February 5th). > > This change serves three primary purposes: > 1. It's easier to completely replace system call implementations for > tracing or compartmentalization purposes. > 2. It simplifies the implementation of restrictions on system calls = such > as those implemented by OpenBSD's msyscall(2) > (https://man.openbsd.org/msyscall.2). > 3. It allows language runtimes to link with libsys for system call > implementations without requiring libc. Awesome! So (3) is generally considered ideal for languages like zig[1],= rust or go, to use directly? What=E2=80=99s the appropriate mechanism for such a language to know whi= ch version of FreeBSD it=E2=80=99s talking to, to ensure syscall table m= atches the languages expectations? It would be nice to hear about any experiments in (2) and how that compa= res to things such as capsicum. [1]: https://github.com/ziglang/zig/issues/165 A+ Dave