From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id APAfCaZaxGLWswAAbAwnHQ (envelope-from ) for ; Tue, 05 Jul 2022 17:37:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ILUnCKZaxGJPUgEAG6o9tA (envelope-from ) for ; Tue, 05 Jul 2022 17:37:10 +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 CE61528D3E for ; Tue, 5 Jul 2022 17:37:09 +0200 (CEST) Received: from localhost ([::1]:36748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8kbs-0005tZ-HQ for larch@yhetil.org; Tue, 05 Jul 2022 11:37:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8kbd-0005rO-4F for guix-devel@gnu.org; Tue, 05 Jul 2022 11:36:53 -0400 Received: from knopi.disroot.org ([178.21.23.139]:45232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8kba-0007UO-Fj; Tue, 05 Jul 2022 11:36:52 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 237DC40DCD; Tue, 5 Jul 2022 17:36:44 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TFNbLhvm9dJT; Tue, 5 Jul 2022 17:36:42 +0200 (CEST) From: Akib Azmain Turja DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1657035402; bh=IQd2tqQdRA34DoNljtSRlLgEkPzRPQQQQocZ7P8OKxg=; h=From:To:Subject:In-Reply-To:References:Date; b=kp+QrvKB4CvDsRjxaNZWg9NgUwO3pUadZeRKr0vrCihFR7K9LyCE0OfvAt+SxnC4w /f1hZppggrmFMv1IQAcNMtvq5axOBoQSGIdNDD8P8cZmo9eGIn/jyotlximgu5tER5 eaknF5AFtQnf8gGpqTdbJW2iHf7VMTSO6TxXKey5aNXfjlcmMpatbcWjOMtahL7Bwf wRAMEeg0jCYf9+I1d81secjU6zLc+y1Za2w9pPjRMExK484Lkrk8LmYhMlvKEqxUZ+ aEA34C2Ork+g6JMxeldpzmWIdWIxhvctiGn5PKW3mf7iwkuKXQM+Jtgz0uRE/MS1Qf OQ0/1gGIGN7rw== To: jbranso@dismail.de, guix-devel@gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Rust in the kernel In-Reply-To: References: <87sfngkvwq.fsf@disroot.org> <871qv0n5lz.fsf@disroot.org> <878rp9c9x9.fsf@gnu.org> <153bf26688033b7a202cdfa34febc196@dismail.de> Date: Tue, 05 Jul 2022 21:35:59 +0600 Message-ID: <87tu7va7xc.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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=1657035429; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4sgqEM+veOCY60ss93FHMb4rWu2f/KGwOab213x5kGk=; b=F0uLuSHDGBJGG2MhdZmlax4MzJNI+97+S4Bcwy6zx6lvuzqW8uVBXAxMTQxf7yfu91Plut 10cKPGdO4LzmhZmDFfVwOhU1oJHKHQpMiQWUuOprfQIRvZizHkXkCR80g5IiQEN4EeaIgt wGun3o8kmDv0phdrPEyEzRqyw2BDNeCCjPOcMuskEkfVtyGGChNk4I06k8RKqO3IKQkd9K jiPpgdA1pNJJgt8nPVyZXi97zR5FIH7MRzfEwUWcN2Dto1A+Tqk6sWkEdsA+ojnnXUNwG+ 7J1YsH/tSTHKC91dFvp8cTzgdApbiUMDFb8ndYpkHoSGUmltgJGdZyEnPv/uhQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657035429; a=rsa-sha256; cv=none; b=Hhv/nvdxlC0zaCBqpHl5VICpkHDQvm+7V4hNUP70krVvhKKtvuL/HDCO1uNjnrexLk7xNG 9T7hrPb+DBg3VWktlSrb8jZ4vH0Hhl6IuIHrGI/bb/J+p445Ri1KBsWthJF7YFkApK4Sn/ p6Y01CtYHKqpoH6gnVtzEQVihRgyHqf92E+GYVXD9i2tIJjzzriGinhKm7QjyJ+OGTUB+4 tDjv9nlscOBXLynlQeaNGG1VauS/XBUVrYJ7xNycb1bvNWXQSd4CwgQjDMKAvDmVJz3UVa nIpe4URnJNnR2BQMU9FZXhuZK0OxAWQeOs1KOUMSxWCEjXJxyLZF4eQXZCnOBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=kp+QrvKB; dmarc=pass (policy=quarantine) header.from=disroot.org; 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: -9.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=kp+QrvKB; dmarc=pass (policy=quarantine) header.from=disroot.org; 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: CE61528D3E X-Spam-Score: -9.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: HTqXPMlkkcMe --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable jbranso@dismail.de writes: > July 5, 2022 12:48 AM, "Akib Azmain Turja" wrote: > >> jbranso@dismail.de writes: >>=20 >>> July 4, 2022 1:36 PM, "Akib Azmain Turja" wrote: >>>=20 >>>> Ludovic Court=C3=A8s writes: >>>=20 >>> Hi! >>>=20 >>> Leo Famulari skribis: >>>> The effort to use the Rust programming language within the Linux kernel >>>> is progressing and may be realized in the next few months: >>>>=20 >>>> https://lwn.net/SubscriberLink/899182/6c831b90eaee015e >>>> https://www.memorysafety.org/blog/memory-safety-in-linux-kernel >>>>=20 >>>> Within Guix, we'll need to adapt our kernel build processes in order to >>>> support this. >>>>=20 >>>> Although 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 >>> Understood=E2=80=A6 >>>> So, interested volunteers should begin organizing :) >>>=20 >>> Yup! >>>=20 >>> Now, concretely, how long will it take before key parts of the kernel >>> 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 >>> This is not to say that we shouldn=E2=80=99t start organizing, but rath= er that >>> we still have a bit of time ahead. >>>=20 >>> (During that time, interested readers can also take a stab at improving >>> 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 >>> Ludo=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 >>> From the Hurd wiki: https://www.gnu.org/software/hurd/advantages.html >>>=20 >>> The 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 >>> Some visual explantions: >>>=20 >>> https://en.wikipedia.org/wiki/Microkernel#/media/File:OS-structure.svg >>>=20 >>> The Hurd is on the right in this image. >>=20 >> Thanks, now I understand Ludo' was saying about virtual address space, >> achieved using paging. >>=20 >>> Essentially, 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 >> I know microkernels are theorically slow due to the heavy use IPC. But >> 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. Yes, I know that Mach is one of the slowest kernels. BTW, what's the status of Viengoos? > > >>=20 >>>> -- >>>> Akib Azmain Turja >>>>=20 >>>> This message is signed by me with my GnuPG key. It's fingerprint is: >>>>=20 >>>> 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 >>=20 >> -- >> Akib Azmain Turja >>=20 >> This message is signed by me with my GnuPG key. It's fingerprint is: >>=20 >> 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 =2D-=20 Akib Azmain Turja This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLEWmAACgkQVTX89U2I YWtfKw/9Gci/kgpJ722RRNqVwlDcn985Db5DkmAp2XAJERqBrJbVhHft0TdplOFT B/I797/OKC353WmSeHUNYiGpGp3QinDMXoFGaWJ8KdqFq03q3i6eNv2xG+1Hm8QR q6V29Gr+D+/ZZNsm76mMEkpeq8wsDrMO84PcwoSubX7myhShPRUbdc+DZHOG1yoN lemLjkQul06gymi65YeLPQfNsqVpxvApKQniJokfWqaFrsAW45zA+eOA62/b+bIR YcdpmecLEXn1CSyIy3gkFN4mnidvsTAdYSaLXy9f4Fu8/ex2BhP9DWJYdggu1TFT Gdacec5LNyVvpJpAU/z4uzLnGzVroFIaz9lx8KDY9eGy8evmegRFN1hNaVXV+iDj Z4zvjtHecCRJ0A2L9x8cO8VqTeEnyZJ0uSD9gk83ufhaGlv+wZZ0IpyOkVzUdKCi /5rz2Q8ASkcEki/cbZk3iYg/ZRN2ZDY87sWDGfyI/YwK9J1wnsLAYz6vp9idCf+K rzkvwnHwYw3K+JEeEB9RPA5ADCgV3BVUsJdHBWDFzNAEEq+tsfdTsbZkDCbQXHpD LSgiOhrACEZavf1q9XnXtibS4gg1A92BZDXiujNkaiadcCT4Bc3qj8YoJo9EKgSF jq/wNhgjqLrogWfhCPQUdYvH1AGisxDxJvIjoqjeg9Hi1C/46Gk= =HTbH -----END PGP SIGNATURE----- --=-=-=--