From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evhXK-0005v0-1v for guix-patches@gnu.org; Tue, 13 Mar 2018 06:52:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evhXG-0002HE-QU for guix-patches@gnu.org; Tue, 13 Mar 2018 06:52:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evhXG-0002H0-Lk for guix-patches@gnu.org; Tue, 13 Mar 2018 06:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1evhXG-0003qp-91 for guix-patches@gnu.org; Tue, 13 Mar 2018 06:52:02 -0400 Subject: [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87ina1qxic.fsf@gnu.org> <20180312123918.22645-1-ludo@gnu.org> <20180312123918.22645-5-ludo@gnu.org> <20180312210936.7f89a29c@scratchpost.org> <87h8plkkkc.fsf@gnu.org> <20180313100539.442c4aa9@scratchpost.org> Date: Tue, 13 Mar 2018 11:51:42 +0100 In-Reply-To: <20180313100539.442c4aa9@scratchpost.org> (Danny Milosavljevic's message of "Tue, 13 Mar 2018 10:27:06 +0100") Message-ID: <87zi3cp7sx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 30604@debbugs.gnu.org Hello, Danny Milosavljevic skribis: > On Mon, 12 Mar 2018 23:14:59 +0100 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> > One of the devnames created statically is the one for btrfs, so not wr= iting or >> > using devnames is not going to end well.=20=20 >>=20 >> We=E2=80=99re fine because btrfs, 9p, overlay, etc. all have an =E2=80= =9Cfs-btrfs=E2=80=9D, >> =E2=80=9Cfs-9p=E2=80=9D, etc. alias, which shows up in =E2=80=9Cmodules.= alias=E2=80=9D. No need for >> =E2=80=9Cmodules.devname=E2=80=9D AFAICS. > > The other filesystems are not such a problem - but BTRFS has its own snap= shotting/ > multivolume functionality - and it's possible that someone accesses /dev/= btrfs-control > "too early" for that. > > I applied your patches to a fresh clone of guix master now, ran the btrfs= -root-os > system check, and indeed I get (tried two rounds, happened both times): > > $ make TESTS=3Dbtrfs-root-os check-system > [...] > Scanning for Btrfs filesystems > WARNING: failed to open /dev/btrfs-control, skipping device registration:= No suy > ERROR: there are 1 errors while registering devices > File system check on /dev/vda2 failed; spawning Bourne-like REPL > GNU Guile 2.2.3 > Copyright (C) 1995-2017 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. Do you see a modprobe invocation for =E2=80=9Cfs-btrfs=E2=80=9D or =E2=80= =9Cblock-major-xxx=E2=80=9D before? >> > (I'd also copy the modules.builtin (from Linux). >> > Also, what happens if we load a module which has as dependency a buil= tin? >> > Will we try to load the builtin as a .ko file and fail the entire thi= ng?)=20=20 >>=20 >> The dependency of a builtin is necessarily a builtin,=20 > > Yes. > >>and the kernel won=E2=80=99t invoke modprobe for a builtin, will it?=20=20 > > I've read Linux's __request_module and I can't find where they > pre-check anything - neither whether there's already a builtin > nor whether it's loaded already. > > They probably don't check. But I'll read it again, more carefully... > > (request_module isn't that popular so it makes sense for them not to comp= licate > the kernel by these checks when there are like 8 callers in total - and a= ll on init) Right, and the worst that can happen is that modprobe will fail, but that=E2=80=99s fine because the functionality is already there anyway. Ludo=E2=80=99.