From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IBWhBimNxGJpbwEAbAwnHQ (envelope-from ) for ; Tue, 05 Jul 2022 21:12:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qLC6BSmNxGK5RwEAG6o9tA (envelope-from ) for ; Tue, 05 Jul 2022 21:12:41 +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 868D4394D8 for ; Tue, 5 Jul 2022 21:12:40 +0200 (CEST) Received: from localhost ([::1]:51348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8nyR-0000Fh-Ml for larch@yhetil.org; Tue, 05 Jul 2022 15:12:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8nhR-0007bc-Qd for guix-devel@gnu.org; Tue, 05 Jul 2022 14:55:05 -0400 Received: from mx1.dismail.de ([78.46.223.134]:37360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8nhP-0006JG-6e; Tue, 05 Jul 2022 14:55:05 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 37ed5237; Tue, 5 Jul 2022 20:54:58 +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=FH McEybeGAtZw2L55V6oiolGSHFRNg/mq+Ey03XELrs=; b=sNZlL6PwplsPqlNx/v KXZQxVeUxDILGhapEj/tjJCA3+YVqD3FG2ggWrVOZi5rjDlbpOO9ERgRWOihFUho 6SIpxtdKlXOyvPEnjPEvt/N8FC4rHXQCMPMvzwbvZnctOvFbq72x1XhR4oAwibM4 0n4xJNgftg8nUho74HwgzW/+SWpuuWpulGkxsr5WKm74i8E1KLn2T/JYPMmSCwel j5W5So6zpN4FQU79ofLMr2oOEXV/EQSwNImmBf6YtUK/Jjkg6IXCcHINy168si6H hGEgHArjquK/YdidjO1lkQwCEatJcc+QKxC7bveVi/aTUb6lht+MAQyEFMCFYok5 rv4Q== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 7a51fbb6; Tue, 5 Jul 2022 20:54:58 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 24934680; Tue, 5 Jul 2022 20:54:57 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2fecba20 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 5 Jul 2022 20:54:57 +0200 (CEST) MIME-Version: 1.0 Date: Tue, 05 Jul 2022 18:54:57 +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: <623d3294d68d7742031cd2c25af1c4b3@dismail.de> Subject: Re: Rust in the kernel To: "Akib Azmain Turja" , guix-devel@gnu.org, "=?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?=" In-Reply-To: <87tu7va7xc.fsf@disroot.org> References: <87tu7va7xc.fsf@disroot.org> <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=1657048360; 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=rMl4SgTXTfuuTBEDHjz7DKnM6rkrPidRF8PAibuBpGo=; b=oduBxdeeVeUTis0AAt8WpHV60HWoxNdoE9fKEiABVek9h6LsGdfMNF78FCNqxWWm4lgiir mPrJdFffHA8Utv7gdbEhHTXW5+ehFY+9aFteLC+wMO7yler471uzBFjp5o8xBEkva4gCgR HkE4mpUtgwwp81LdGJ2YVS5aUjotBJZjRrIR5bJvxINzjIg/RP1SkmhrbJbSYyAucQ90m/ pkzprp7nkN/s6+VOjGmyVT30cO18yCbt1wBGZG/vD8OBymDzBHCBWHezA0V2ibK8KzvaKo SFSC4l1C2yd03iQwpYJz/91oLVO/kOv2zaoeqPv+ehqSvofc2RC1jLev2QvoDA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657048360; a=rsa-sha256; cv=none; b=Yv1nijYRSIqqW34wmcJgiduPh2CjgFT5TQMpN7orq1nTbIJmYt6hvQy85IWKXhV7z4gyeS CUT7fRT+UhoI9M6dege6T40N7X45izKj2kU+LIrKNBDqpFMC5YuAyb80m0zsU31SUxyN1k kQGKIMIdSZxejra3hX95gYEtcTpDXcSyCRDWxJfRTCDt9+Jkkf1zdVz2JeWRKSsVo37uTW eOzvObUqtygeR4SGQevAYPTdK/2bMjB3PXAB10aNrzN3H1clAvmMS9gUWtXfO5a5cBsDqt JlIaz4Ow8ZZSCfgXvDuZqM4d+JH3vITJjf8xj51JaarYtlx7b5wEIL8KhMuq1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=sNZlL6Pw; 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=sNZlL6Pw; 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: 868D4394D8 X-Spam-Score: -5.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: WCNl2PI/rvLz July 5, 2022 11:36 AM, "Akib Azmain Turja" wrote: > jbranso@dismail.de writes: >=20 >>=20July 5, 2022 12:48 AM, "Akib Azmain Turja" wrote: >>=20 >>>=20jbranso@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 kerne= l >> 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 order= to >> support this. >>=20 >>=20Although I help with updating and configuring the kernel builds, I w= on'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. >>> Thanks, 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. >>> I 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? >>=20 >>=20Probably a little, but I am not an expert in that area. >>=20 >>=20GNU 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 >=20Yes, I know that Mach is one of the slowest kernels. BTW, what's the > status of Viengoos? I believe that Viengoos is essentially dead. I do not believe that anyone is actively working on it.=20=20 More=20info is available here: http://www.gnu.org/software/hurd/history/port_to_another_microkernel.html >=20 >>>=20 >>=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 >>> -- >>> 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