From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: by atuin.qyliss.net (Postfix, from userid 496) id ADD1D2FE1D; Sun, 22 Aug 2021 21:31:06 +0000 (UTC) Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id D51BE2FD55; Sun, 22 Aug 2021 21:30:50 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 52BF72FD29; Sun, 22 Aug 2021 21:30:48 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by atuin.qyliss.net (Postfix) with ESMTPS id 5744A2FCE8; Sun, 22 Aug 2021 21:30:43 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id C78C632008FE; Sun, 22 Aug 2021 17:30:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 22 Aug 2021 17:30:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h= date:from:to:subject:message-id:mime-version:content-type; s= fm3; bh=rXjNjtPrzjNLxMjxTkVP4KP9uDIxRMWsi4jfNrQW/YU=; b=ivUOZN8V Fx2WxoAv19qXln1QWE6/onpBQXfiAt/PU8AvsuoW3jj4S8R5QH4x520VnJJS70jK JOFUaMkAzngjzVpp+Dww6rWCpMsLispWfjjMqu7c0fA1YvOcoJi8eoYcuh9KPJ9L +shYjg+rDfMaw28kMAf04tCpGqEgwA/lA81IZCTCe719afd4jGE7cqKZGnh6b3wQ b+S2MrQ41p2uJKJcQskVGGStKtiP9ed15qR7/KWjqeJls5eBW1S+qEeeUmcPQRDS kvyUoSK/Z30ywsxx2L/PBnIBahwQ3S/6JI8hWKbMX+Oj8h0b7LnzNZsRMM/aSIvD 5DJ+j8cbtx8SYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=rXjNjtPrzjNLxMjxTkVP4KP9uDIxR MWsi4jfNrQW/YU=; b=CBYX3KXhjawUs1LksQ+hPUY+0MDB0FW0jqgx1Ez+yFb/Y YAaaDwQTUXYSF+wcuhhhh2CiU7dGhYCIGg4ujOgC6IWBg7Ec8LFX1eK1M2wT+A/D d9Z02v6rw6unxa3LOfwpICmk/XpAsOEhn0Da7UM4IjulHFvVkD6kRVF+j6QZE88b GqIYqNW8bpzBR2OQqWSGdomH6v7Ay5ZuBovVpxq4GK4oXnHGpeHHNkvhXRrlN5bC 9Ud3/UnKx5oUNZjwCTmcJVs7uwMIwV0bYgbBLX8TnTgM3rG6TGDn7pVXAUNaojVN CWYagtG/CCaVdV5sdEC1s4dF/YcjF6dylK+keiWyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddtfedgudeivdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehgtddtre dttddvnecuhfhrohhmpeetlhihshhsrgcutfhoshhsuceohhhisegrlhihshhsrgdrihhs qeenucggtffrrghtthgvrhhnpedvvddttdeifeevfeetjedufefgieegffevleeuhfelhf elhfffteelleefleelgfenucffohhmrghinhepshhpvggtthhruhhmqdhoshdrohhrghdp ghhithhhuhgsrdgtohhmpdifihhkihhpvgguihgrrdhorhhgpdhvuhiguhdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehqhihlihhs shesvghvvgdrqhihlhhishhsrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Aug 2021 17:30:39 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id D565213EF; Sun, 22 Aug 2021 21:30:36 +0000 (UTC) Date: Sun, 22 Aug 2021 21:30:36 +0000 From: Alyssa Ross To: discuss@spectrum-os.org, devel@spectrum-os.org Subject: This Week in Spectrum, 2021-W33 Message-ID: <20210822213036.6lx5hb2my3bsgrxy@eve.qyliss.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cbzocdiclblbq5zj" Content-Disposition: inline Message-ID-Hash: RP4LMARFO2T3Y745J3DZ6EJO4ETOUD3S X-Message-ID-Hash: RP4LMARFO2T3Y745J3DZ6EJO4ETOUD3S X-MailFrom: qyliss@eve.qyliss.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.4 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --cbzocdiclblbq5zj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I've had a busy day today and am pretty tired, so I'm not sure how coherent my writing is at the moment. But I'd rather get this out on time, especially since tomorrow is also busy today. As I said last week[1], I took some time off this week as a preventative measure against burnout. [1]: https://spectrum-os.org/lists/archives/spectrum-devel/87lf51ybwk.fsf@a= lyssa.is/ rust-vmm -------- One of my patches[2] was accepted, but another[3] is still waiting. As I said last week, I have more fixes for rust-vmm planned, but want to let them catch up with the changes I've already sent upstream first so I know what base I'm using for the next stuff. I expect the one that's still waiting to be accepted next week. [2]: https://github.com/rust-vmm/vmm-sys-util/pull/135 [3]: https://github.com/rust-vmm/vhost/pull/69 spectrum-live ------------- Last week, I'd just integrated dm-verity into the Spectrum live image I've been working on. When it came time to work on the actual root filesystem, instead of the initramfs, I hit a bit of a brick wall. I realised that trying to generate a whole operating system image using Nix was giving me real writers' block. There was too much inbetween me and how the files ended up on disk, and that meant there was too much overhead to keep in mind when I was thinking about how things should be designed and laid out. It might feel like making a Linux root filesystem should be a solved problem, but Spectrum has a bunch of special requirements. You might want to do something like start a VM for each hardware device of a specific type, and that's something that isn't really addressed by most standard stuff. All this stuff is definitely solveable, but it requires some experimentation to get right, and Nix was getting a bit in the way of that. So I created a new directory, and I wrote a Makefile that builds an ext4 image, and I just started putting files in an etc/ directory. This made reasoning about the system way easier, and I was immediately making progress. Nix is great for building known targets, and for making customisable systems (there's no way my Makefile-based system would allow the amount of customisation I'd easily be able to provide with Nix), but for experimentation, it's a lot nicer to be closer to the end product. So once I know how all this should look I'll make it Nix-aware. Currently, I have a root filesystem with a service manager that can respond to hardware appearing and disappearing. The next (more exciting) step will be to have it start some VMs, and assign hardware to them appropriately. I'm looking forward to getting to that next week. An interesting challenge I'll have to solve will be figuring out simple categories (e.g. "ethernet device") from the huge amount of very specific information the kernel provides. I think I might be able abuse the modules.alias file from the kernel, that defines the mappings =66rom PCI etc. information to default drivers. Then all I'll have to do will be to write mappings from default drivers to whatever categories I come up with, or what VM I want to assign them to, or whatever. One neat thing I'm using for the first time here is tar2ext4[4], a utility program that's part of a larger Microsoft open source project I don't entirely understand the purpose of. It's really useful for me it builds ext4 images entirely in userspace, which will be great for using in Nix derivations where it's not possible to just mount an ext4 image and write directly to it. For previous Spectrum experiments, I'd always used SquashFS[5], entirely because I already knew of a tar2sqfs program[6] that made creating filesystem images really easy. I've added tar2ext4 to Nixpkgs[7], which will hopefully help other people who have similar problems discover it. [4]: https://github.com/microsoft/hcsshim/blob/master/cmd/tar2ext4/tar2ext4= =2Ego [5]: https://en.wikipedia.org/wiki/SquashFS [6]: https://github.com/AgentD/squashfs-tools-ng [7]: https://github.com/NixOS/nixpkgs/pull/134650 musl ---- While I was working on the root filesystem, I noticed that mount -a, which mounts all filesystems described in fstab(5), wasn't working. This turned out to be because of a bug in Musl's implementation of getmntent(3), a libc function for parsing fstab files. So I wrote some tests and a fix and sent them to Musl[8]. [8]: https://inbox.vuxu.org/musl/20210821085420.474615-1-hi@alyssa.is/ Hope that all made sense. Next week, I'll continue working on Spectrum live, and maybe fix the next rust-vmm issue I have on my todo list if my final outstanding PR is merged. --cbzocdiclblbq5zj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmEiwfcACgkQ+dvtSFmy ccB07hAAoiFnqpQc153hdLRcRHREvkEB2FXWPDHkHYRbIEnZI1pKjLYDaSmDYf/P JejPgR3Hfyq4jtIoQfhIWk54Xg+HK8M3fvOWt4MMdAsrWhJVjBuc9+qzoQaWHSSN 4qAcerq02aMZCS1oAFe2TBW4vUojtf7dC4zUARcxYJOGrvjgLf2RzuT291UGYEAa oKNgwiIfOOpbXbtHWaVYc+fT4HfMpOolsnhKSwHJWXPUEwi7nKSfxuWSUBVCsBgL 4gBzThq9L37+T/rDnwnh66alk+YNpJdgj3aZdHCv+1h2dcPt0sIMrnqAF9+V8b+u t1m411xncFythNCAcuqsYEBqDFh1kKAefKs0aiQo0lBW9oeOCjGc1HEGUb2mbg5O EIuQmZ+bUlvjB2VfSAvVt6mxWRH3duBdpAwGkvjYsE7qEosiwvVCyNa3fqp8eH1o NuJwi/6UY1ZnraycUHX6Wjvjippr0eZz2f6PloNgIIWOTUOHhHZ1zz4bmAkMEpcu fQrNelrLdlKlWu8Zlt99jKl5AUGTdi8tcKZJDILdGczZn4vzi3uFODkwswnYJptO 6USHN/wvOBPWAs9o+bXjuwlAxTi/GLNW9/UMaauo4PykXeNBObnsPGP8c1NerwdS 2yvMWoUXnExtFpdTKPpcrJDmRAMihEs7Y2CAWNqR78ohoZ6WkXo= =35vz -----END PGP SIGNATURE----- --cbzocdiclblbq5zj--