GNU bug report logs - #52498
[PATCH] linux-modules: Ignore EINVAL in ‘modprobe’ mode.

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Wed, 15 Dec 2021 00:48:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52498 in the body.
You can then email your comments to 52498 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52498; Package guix-patches. (Wed, 15 Dec 2021 00:48:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 15 Dec 2021 00:48:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org
Subject: [PATCH] linux-modules: Ignore EINVAL in ‘modprobe’ mode.
Date: Wed, 15 Dec 2021 01:47:04 +0100
Loading the framebuffer-coreboot module simply fails with EINVAL on a
non-Corebooted system.  Crashing the system with a kernel panic is not
a reasonable reaction to loading valid modules on unsupported hardware.
The kernel should log an error, which the user is expected to see.

Bogus module names will still be fatally reported by linux-modules.drv.

* gnu/build/linux-modules.scm (load-linux-module*):
Ignore EINVAL errors when operating recursively.
---
 gnu/build/linux-modules.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm
index 3a47322065..053720574b 100644
--- a/gnu/build/linux-modules.scm
+++ b/gnu/build/linux-modules.scm
@@ -354,11 +354,13 @@ (define (load-dependencies file)
              (close-fdes fd)
              #t)
            (lambda args
-             ;; If this module was already loaded and we're in modprobe style, ignore
-             ;; the error.
              (when fd (close-fdes fd))
-             (or (and recursive? (= EEXIST (system-error-errno args)))
-                 (apply throw args)))))))
+             (let ((errno (system-error-errno args)))
+               (or (and recursive?      ; we're operating in ‘modprobe’ style
+                        (member errno
+                                (list EEXIST    ; already loaded
+                                      EINVAL))) ; unsupported by hardware
+                   (apply throw args))))))))
 
 (define (load-linux-modules-from-directory modules directory)
   "Load MODULES and their dependencies from DIRECTORY, a directory containing
-- 
2.34.0





Added indication that bug 52498 blocks51619 Request was from Leo Famulari <leo <at> famulari.name> to control <at> debbugs.gnu.org. (Wed, 15 Dec 2021 01:42:01 GMT) Full text and rfc822 format available.

Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Thu, 16 Dec 2021 18:00:06 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Thu, 16 Dec 2021 18:00:06 GMT) Full text and rfc822 format available.

Message #12 received at 52498-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 52498-done <at> debbugs.gnu.org
Subject: Re: [bug#52498] [PATCH] linux-modules: Ignore EINVAL in ‘modprobe’ mode.
Date: Thu, 16 Dec 2021 12:59:01 -0500
On Wed, Dec 15, 2021 at 01:47:04AM +0100, Tobias Geerinckx-Rice via Guix-patches via wrote:
> Loading the framebuffer-coreboot module simply fails with EINVAL on a
> non-Corebooted system.  Crashing the system with a kernel panic is not
> a reasonable reaction to loading valid modules on unsupported hardware.
> The kernel should log an error, which the user is expected to see.
> 
> Bogus module names will still be fatally reported by linux-modules.drv.
> 
> * gnu/build/linux-modules.scm (load-linux-module*):
> Ignore EINVAL errors when operating recursively.

Thanks, pushed as 13f13554433c9dd47503131107dfbdd8a8031832




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Jan 2022 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.