From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 18 14:12:02 2021 Received: (at 49611) by debbugs.gnu.org; 18 Jul 2021 18:12:02 +0000 Received: from localhost ([127.0.0.1]:57143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5BGk-0008Ru-Gh for submit@debbugs.gnu.org; Sun, 18 Jul 2021 14:12:02 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:60299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5BGh-0008RT-Hb for 49611@debbugs.gnu.org; Sun, 18 Jul 2021 14:12:00 -0400 Received: from relay7-d.mail.gandi.net (unknown [217.70.183.200]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 7BE3AC4164 for <49611@debbugs.gnu.org>; Sun, 18 Jul 2021 17:48:06 +0000 (UTC) Received: (Authenticated sender: brice@waegenei.re) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5857720004; Sun, 18 Jul 2021 17:47:59 +0000 (UTC) From: Brice Waegeneire To: Katherine Cox-Buday Subject: Re: bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` References: Date: Sun, 18 Jul 2021 19:47:54 +0200 In-Reply-To: (Katherine Cox-Buday's message of "Sat, 17 Jul 2021 16:43:43 -0500") Message-ID: <87r1fvsed1.fsf@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49611 Cc: 49611@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Katherine, TL;DR: =E2=80=9Ciw reg set US=E2=80=9D correctly set the regulatory region = from userland but Guix can't set it just from the kernel. Katherine Cox-Buday writes: > #+BEGIN_EXAMPLE > [ 8.280462] cfg80211: Loading compiled-in X.509 certificates for > regulatory database > [ 8.282686] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' > [ 8.284394] platform regulatory.0: Direct firmware load for > regulatory.db failed with error -2 > [ 8.284415] cfg80211: failed to load regulatory.db > #+END_EXAMPLE There is three way to make the module cfg80211 load a regulatory database: 1. Baking the DB into the kernel at build time by replacing the kernel's limited DB with the one from 'wireless-regdb' via the option CONFIG_CFG80211_INTERNAL_REGDB=C2=B9. 2. Loading the DB at boot time as a signed firmware file (lib/firmware/regulatory.db from 'wirerless-regdb') via the module 'cfg80211'. 3. Doing it in userland with the helper 'crda' trough the utility 'iwd' or its predecesor 'wpa_supplicant'.=C2=B2 From what I understand and what I tested, only the third method works in Guix System ATM. It could be usefull to also support the first or second method to not depend on the userland setting the wireless regulatory settings. The error you are experiencing come from the second method failing to load the signed firmware file. The issue is that Guix's 'wireless-regdb' is build from source and not just copied as other distribution do, where the provided binary also has a signature which the kernel accept through a built in public key. Our build version isn't signed at all, the commentaries in the definition for the package say Guix don't want to maintain its own key for signing this package, which is understable and state that Guix architecture already provide a similar level of authenticity (I'm not so sure of that part). So this error message should be harmless expected in some less common context, such as having the rootfs on an NFS and using a wireless connection to connect to the NFS server. We could fix that without maintaining keys by baking the DB into the kernel (first method). > #+BEGIN_EXAMPLE > $ find -L /run/current-system -name regulatory.db > /run/current-system/profile/lib/firmware/regulatory.db > #+END_EXAMPLE We don't need the regulatory.db from 'wirelress-regdb' to be in the system profile, instead it should be added to the operating-system's firmware field. And the kernel will find it the directory contained in =E2=80=9C/sys/module/firmware_class/parameters/path=E2=80=9D. =C2=B9 https://cateee.net/lkddb/web-lkddb/CFG80211_INTERNAL_REGDB.html =C2=B2 https://wireless.wiki.kernel.org/en/developers/regulatory/crda#chang= ing_regulatory_domains Cheers, - Brice