From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yCiVH4RExGL95gAAbAwnHQ (envelope-from ) for ; Tue, 05 Jul 2022 16:02:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8INiH4RExGKUzgAAauVa8A (envelope-from ) for ; Tue, 05 Jul 2022 16:02:44 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA499A502 for ; Tue, 5 Jul 2022 16:02:41 +0200 (CEST) Received: from localhost ([::1]:51312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8j8T-0001nW-45 for larch@yhetil.org; Tue, 05 Jul 2022 10:02:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8j6d-0008Ej-N3 for guix-devel@gnu.org; Tue, 05 Jul 2022 10:00:47 -0400 Received: from mx1.dismail.de ([78.46.223.134]:13954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8j6U-00088m-GU; Tue, 05 Jul 2022 10:00:47 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 2e816f50; Tue, 5 Jul 2022 16:00:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to:in-reply-to:references; s=20190914; bh=/t hIW55YZ+hT3MoANlxbXubRtuBmhUyPbhAuzfBTSl8=; b=H5h9n8tzPwLe0nwniw PWkO1rMlPY6yvQIQAZ4F1FUKEnsLnWH1DzFLkwT1UNbAjgsRORMfvg4AoshwLft/ 1yfHWkc8KF2aP4tAAAyhBn0p6fjcDyNRYBYiFUuSndaSY58WdceVFDPkMNR98l9P SIbf7UiW0W+yf3IpRv3hl7JL+v6d91+y2mutzZiLnXy/r+tvA8Qgb5Gi9E/JgaI7 qyIGqBNYlLp2N3fDQVy2r14eLTTrXouB70oEbrGF65xs4YetKatzIi7jcMHbENRO 3B83HBQezPDaJA68TL/KFjcUcbZ+HodXDPdsoxRYQyHXQvr2vgkBPRZ9EhPh8FMx WQZg== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id c1a5327a; Tue, 5 Jul 2022 16:00:31 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 65c1549b; Tue, 5 Jul 2022 16:00:31 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 31e24a4d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 5 Jul 2022 16:00:30 +0200 (CEST) MIME-Version: 1.0 Date: Tue, 05 Jul 2022 14:00:29 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.16.0a From: jbranso@dismail.de Message-ID: Subject: Re: Rust in the kernel To: "Akib Azmain Turja" , guix-devel@gnu.org, "=?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?=" In-Reply-To: <87sfngkvwq.fsf@disroot.org> References: <87sfngkvwq.fsf@disroot.org> <871qv0n5lz.fsf@disroot.org> <878rp9c9x9.fsf@gnu.org> <153bf26688033b7a202cdfa34febc196@dismail.de> Received-SPF: pass client-ip=78.46.223.134; envelope-from=jbranso@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657029762; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=xMYBT4NAj/bNRLWs0LUUEsTsGu2QQnf/epaGJ7BZMOo=; b=VhEyP0ZkgMroPvnHttoNVBMaBxlA42N8+twDXkU7jPWwxUKZ+Y7CzGRA+KF9jtrhxD/YaH JXMpoQ/zEku7zQpiMwLsbhvxBM+ESRhUAGSGaGDaWanA+D0Z7kSUJviwyf3GBhq3rweLA0 c52s+YMoecI0xufa1x/ZvSaOXYrtw0lPajMyOgbuhjLTIzEgNV0Jusz+eWtbJUgq1ws6gk RLul2xkryAVHvCm8tWpRSFEOzHHvyVs5fzKlNytiNS+Yd0r69mZjib6vpWjsTfhuLbFQUc cPXoz6sqWz/uGiRMwuWIGZJzpiEMBcOSmAU+s5n5ypJMNLqndE+jXf95ygSQpQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657029762; a=rsa-sha256; cv=none; b=E5yQDTxOdRZl/C/+uU2l/gE0UAVNuNVcR9c53UGZP2TsQ++/Ycx4DhPNUBsHZt9vlbmhbW Z0+CWZWKR3odpCjs8ep4h9Wx3+sXT/+WUReCOzy0GKh6Qi5FygznWl4bpexr+zV5Mlxc+B K982NnWmrWZxbglcSuBV9b0gXlmlGJLG2cLevK3ToppUs+nnZXGiVfULtE+ejyOPazvGDx /nHV6IA6n8ZINod7wqTXbvv8ACfA1xy5LxGnt/Dg51tMfocVM2nSb7dsjNgtO5vw4Uc2Lz 0rwAq2aZRNTIxiq0r4hpbBFcsTEfoXrv7JDe5EONS6fcjSs0blF8dYMGw4PFQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=H5h9n8tz; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=H5h9n8tz; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DA499A502 X-Spam-Score: -5.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: lN8JL+y/1wUF July 5, 2022 12:48 AM, "Akib Azmain Turja" wrote: > jbranso@dismail.de writes: >=20 >>=20July 4, 2022 1:36 PM, "Akib Azmain Turja" wrote: >>=20 >>>=20Ludovic Court=C3=A8s writes: >>=20 >>=20Hi! >>=20 >>=20Leo Famulari skribis: >>> The effort to use the Rust programming language within the Linux kern= el >>> is progressing and may be realized in the next few months: >>>=20 >>>=20https://lwn.net/SubscriberLink/899182/6c831b90eaee015e >>> https://www.memorysafety.org/blog/memory-safety-in-linux-kernel >>>=20 >>>=20Within Guix, we'll need to adapt our kernel build processes in orde= r to >>> support this. >>>=20 >>>=20Although I help with updating and configuring the kernel builds, I = won't >>> be able to participate in the "Rust in the kernel" effort for Guix. >>=20 >>=20Understood=E2=80=A6 >>> So, interested volunteers should begin organizing :) >>=20 >>=20Yup! >>=20 >>=20Now, concretely, how long will it take before key parts of the kerne= l >> are written in Rust? Hopefully a long time, no? Per the article above, >> it=E2=80=99s starting small, with Rust usage in well-defined locations= . >>=20 >>=20This is not to say that we shouldn=E2=80=99t start organizing, but r= ather that >> we still have a bit of time ahead. >>=20 >>=20(During that time, interested readers can also take a stab at improv= ing >> support for the Hurd, which relies on that revolutionary technology >> called =E2=80=9Caddress spaces=E2=80=9D to ensure Memory Safety=E2=84= =A2 among other things!) >>=20 >>=20Ludo=E2=80=99. >>> "Address spaces"! What's that? Sorry for asking without searching the >>> internet first, but the Hurd designers are so creative that a few >>> understand the concepts and join the community, so there is a little >>> chance (if any) that I'll find any useful information on that. >>=20 >>=20From the Hurd wiki: https://www.gnu.org/software/hurd/advantages.htm= l >>=20 >>=20The Hurd is built in a very modular fashion. Other Unix-like kernels >> (Linux, for example) are also modular in that they allow loading >> (and unloading) some components as kernel modules, but the Hurd goes >> one step further in that most of the components that constitute the >> whole kernel are running as separate user-space processes and are thus >> using different address spaces that are isolated from each other. >> This is a multi-server design based on a microkernel. It is not >> possible that a faulty memory dereference inside the TCP/IP stack >> can bring down the whole kernel, and thus the whole system, which >> is a real problem in a monolithic Unix kernel architecture. >>=20 >>=20Some visual explantions: >>=20 >>=20https://en.wikipedia.org/wiki/Microkernel#/media/File:OS-structure.s= vg >>=20 >>=20The Hurd is on the right in this image. >=20 >=20Thanks, now I understand Ludo' was saying about virtual address space= , > achieved using paging. >=20 >>=20Essentially, if your fileserver somehow gets hacked, the attacker >> cannot magically access your TCP/IP stack, because your TCP/IP is not >> in the some "software zone" as your fileserver. So microkernels like >> the Hurd are usually considered more secure and better designed >> than monolithic kernels like Linux. However, monolithic kernels >> will usually be faster than microkernels. >=20 >=20I know microkernels are theorically slow due to the heavy use IPC. Bu= t > is it really impossible for well written microkernel to beat a well > written monolithic kernel? L4 is super-fast, is it still slower than > Linux? Probably a little, but I am not an expert in that area. GNU Mach, which is what the Hurd runs on. Is slower that Linux. There was an attempt to port the Hurd to L4 before. It is deemed not possible by the current hurd developers. >=20 >>>=20-- >>> Akib Azmain Turja >>>=20 >>>=20This message is signed by me with my GnuPG key. It's fingerprint is= : >>>=20 >>>=207001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 >=20 >=20-- > Akib Azmain Turja >=20 >=20This message is signed by me with my GnuPG key. It's fingerprint is: >=20 >=207001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5