From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cBQrLfO/91/xEwAA0tVLHw (envelope-from ) for ; Fri, 08 Jan 2021 02:14:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iAAcKfO/918rewAAB5/wlQ (envelope-from ) for ; Fri, 08 Jan 2021 02:14:11 +0000 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 644389403E6 for ; Fri, 8 Jan 2021 02:14:11 +0000 (UTC) Received: from localhost ([::1]:41540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxhI2-0003b3-6H for larch@yhetil.org; Thu, 07 Jan 2021 21:14:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxhHv-0003Yo-4j for guix-patches@gnu.org; Thu, 07 Jan 2021 21:14:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxhHu-0000cB-Sh for guix-patches@gnu.org; Thu, 07 Jan 2021 21:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxhHu-0003H1-M9 for guix-patches@gnu.org; Thu, 07 Jan 2021 21:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45722] [PATCH] gnu: kernel-module-loader does not require file-systems Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Jan 2021 02:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45722 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45722@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.161007199712511 (code B ref -1); Fri, 08 Jan 2021 02:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Jan 2021 02:13:17 +0000 Received: from localhost ([127.0.0.1]:48976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxhHB-0003Fj-GU for submit@debbugs.gnu.org; Thu, 07 Jan 2021 21:13:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:34296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxhH6-0003FW-FQ for submit@debbugs.gnu.org; Thu, 07 Jan 2021 21:13:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxhH6-0002yg-0e for guix-patches@gnu.org; Thu, 07 Jan 2021 21:13:12 -0500 Received: from mail-40130.protonmail.ch ([185.70.40.130]:55812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxhH2-0000G4-Lp for guix-patches@gnu.org; Thu, 07 Jan 2021 21:13:11 -0500 Date: Fri, 08 Jan 2021 02:12:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610071976; bh=UwfzimmU997PGFAfa5tarj0MdfkcRw33CjF17Hh+fW4=; h=Date:To:From:Reply-To:Subject:From; b=rZuUlnQ+zJQxVO8P2wfELC4QC/7sHL9m+sXdcQMET1LDjP1dYZnRP259XwekqEshL qQajhMta1LJl4dJfbokhNUyp3H98bDEFtKgbG8xHUUJkDm1KC+CQ2s7TQoNWq4DkQe cqRwk5qZCexerAkowLdCt67+KUevPun4K0B3NOAA= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.130; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40130.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: raid5atemyhomework , raid5atemyhomework via Guix-patches From: raid5atemyhomework via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.85 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=rZuUlnQ+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 644389403E6 X-Spam-Score: -2.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: jWTAd61w8yIt In https://issues.guix.gnu.org/45692#5 Danny brings up that the `kernel-mod= ule-loader-shepherd-service` might not need to depend on `file-systems`. So: * `kernel-module-loader-shepherd-service` uses the `/proc` filesystem. * However, this filesystem is mounted in `initrd` before handing over to = the real root (in `gnu/build/linux-boot.scm`'s `mount-essential-file-syste= ms`, which is called in `boot-system` very early. * Before handing over to the real root, the mounts are moved in `move-ess= ential-file-systems`, which is called by the `switch-root` procedure that i= s called by `boot-system` after mounting the root filesystem. * The `/proc/sys/kernel/modprobe` file contains a reference to a `/gnu/stor= e` path to a `modprobe` binary. * Shepherd starts with the root file system already mounted (by the `init= rd` `boot-system` procedure), so the full `/gnu/store` should be accessible= as soon as Shepherd starts. I've tested this as follows: * Created a QEMU VM image that pointlessly loads "btrfs" (which is not load= ed by default) by `(simple-service 'load-btrfs kernel-module-loader-service= -type '("btrfs"))` and confirmed it boots to desktop and `lsmod` lists `btr= fs`. * Ran tests "loadable-kernel-modules-0", "loadable-kernel-modules-1", and "= loadable-kernel-module-2" and confirmed they pass. In theory this could break a system, if an existing kernel module reads fro= m some file (which Linux kernel modules are discouraged from doing) at load= time *and* the system administrator put that file in a non-root filesystem = (which if it's a "proper" module it should be in either `/etc` or `/var`, t= he former of which is, on Guix System, created by Guix on the root filesyst= em, and the latter of which should generally be on the root filesystem as w= ell). So I think the risk of this breaking *some* system is fairly low. Please review. >From d028dac0efaf6ab3d8edafc2e68c0d2ef692bab7 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Fri, 8 Jan 2021 09:41:25 +0800 Subject: [PATCH] gnu: kernel-module-loader does not require file-systems * gnu/services/linux.scm (kernel-module-loader-shepherd-service): Remove requirement of file-systems. --- gnu/services/linux.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm index 1046a7e0c2..340b330030 100644 --- a/gnu/services/linux.scm +++ b/gnu/services/linux.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; Copyright =C2=A9 2020 Brice Waegeneire ;;; Copyright =C2=A9 2020 Efraim Flashner +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -150,7 +151,7 @@ representation." (shepherd-service (documentation "Load kernel modules.") (provision '(kernel-module-loader)) - (requirement '(file-systems)) + (requirement '()) (one-shot? #t) (modules `((srfi srfi-1) (srfi srfi-34) -- 2.30.0