From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UAxbKvc8uWGgaAEAgWs5BA (envelope-from ) for ; Wed, 15 Dec 2021 01:55:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sHn2Jfc8uWGdHgAAbx9fmQ (envelope-from ) for ; Wed, 15 Dec 2021 00:55:19 +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 7357B13337 for ; Wed, 15 Dec 2021 01:55:19 +0100 (CET) Received: from localhost ([::1]:58096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxIZi-0004I4-LL for larch@yhetil.org; Tue, 14 Dec 2021 19:55:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxISg-0002Sc-C2 for guix-patches@gnu.org; Tue, 14 Dec 2021 19:48:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxISg-0001N9-2q for guix-patches@gnu.org; Tue, 14 Dec 2021 19:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxISf-0006pW-Id for guix-patches@gnu.org; Tue, 14 Dec 2021 19:48:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52498] [PATCH] linux-modules: Ignore EINVAL in =?UTF-8?Q?=E2=80=98modprobe=E2=80=99?= mode. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Dec 2021 00:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52498 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52498@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163952924526199 (code B ref -1); Wed, 15 Dec 2021 00:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Dec 2021 00:47:25 +0000 Received: from localhost ([127.0.0.1]:59911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxIS4-0006oV-RL for submit@debbugs.gnu.org; Tue, 14 Dec 2021 19:47:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:44176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxIS3-0006oO-Ct for submit@debbugs.gnu.org; Tue, 14 Dec 2021 19:47:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxIS2-0002Ha-8R for guix-patches@gnu.org; Tue, 14 Dec 2021 19:47:23 -0500 Received: from [2a02:c205:2020:6054::1] (port=34696 helo=tobias.gr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxIRu-0001Jm-VQ for guix-patches@gnu.org; Tue, 14 Dec 2021 19:47:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=mAq6ZmKp1Is3W NJCD10dFnMTJcaltNKYkX+D9a+iiP0=; h=date:subject:to:from; d=tobias.gr; b=b223cPYgHGbg6KysfrWrFLSKNj20Bf9ZTHk3p+HE23Oa+iqap4Klsz2c/hxCfEfSKWjL Jm+GQdX+XxcRzI+LyD0JYyKazSo60L4+NIZNTVMjFRuby9bnJX/glgRl2fiYwyhY1O+3T7 uvVW4ZL7XXy8I3Sf1NxEoduF3ublHYII8wPx0rmXbs4fNgMvwCg6V7qUSoUzlTRSNFj37T YF/3I4OcCdVwnjcI1WNuOfaH20/id5t4FaUPSbpBrGWjljEgtH5YzLVuL0p1VgvDy/Sjmp 3DPTP5qEn4C10N4sk82utLAMm+TKnzTJ0n5w3eL2r9vZVvRPkV0R3ZJkkJy1B3pA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id d537da01 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Wed, 15 Dec 2021 00:47:07 +0000 (UTC) Date: Wed, 15 Dec 2021 01:47:04 +0100 Message-Id: <20211215004704.25215-1-me@tobias.gr> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:c205:2020:6054::1 (failed) Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639529719; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=mAq6ZmKp1Is3WNJCD10dFnMTJcaltNKYkX+D9a+iiP0=; b=iNUVH1YTBrioGCJ4C+xgx1APoaDgLeTrA7PqiSQxlh7KrG5hV1Sg1mhgbOWS5U9GQYznMh 1eEklxIDW24jfquyse2hkaj+wOvo/4CZ12ykUlfart4vgWe/0YXwlJAl5P49awTpJ9h5ol KhIVJk1evPZQID9f38YAICnQbJXqK6GQSUiyiw7VKRyUmcRJB6T6iih7SgJYXKuyyBGOMg PxvS/ZBD9zjlq7JorwwJ5vlzfJ3OOgiI9I8BmCsgtDhGXJmdbkYLbnpZEwAkh4s+wJJY66 RsgnoWtODwUAMeTdc5MO/JuthgAhN1xjO7UbXZ+2JGLz43AvKNOW/QsU+ZBzoQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639529719; a=rsa-sha256; cv=none; b=ZreskJ4CxZAxFqIxc5U7XHtkKDJgRy3/QKGxKLRpv9Mqxcf4s7LzBp7w5iAajGmyrm8nVs UZ+ZHr+tFhjjEFyAUHo4s5lilCtYOq8eMvsO2gLozjV172QuUA6A5sH3hyDm7swcOBvX4z sWeENLXH7lSbfgTz5ozn1sknE3w6IPjk7O3GqbOeGTRD+sihngR8PqELHxmd8YfvUn0mSV KkLoY5DvNWdIfc1Y5c88MXxeXF2ctXS/hgdg2j033Ns7Mx5hBunp3ZImlI9NuJcl8huylz FvhH/gON4iiNopyGz1I4U2JS0tSr+NvfNZglnKvaoAP3x6VgRVtcNkrjecxg/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=b223cPYg; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.77 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=b223cPYg; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7357B13337 X-Spam-Score: -4.77 X-Migadu-Scanner: scn0.migadu.com X-TUID: boN1fCTZecBI 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