* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` @ 2021-07-17 21:43 Katherine Cox-Buday [not found] ` <handler.49611.B.16265582421408.ack@debbugs.gnu.org> 2021-07-18 17:47 ` bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` Brice Waegeneire 0 siblings, 2 replies; 8+ messages in thread From: Katherine Cox-Buday @ 2021-07-17 21:43 UTC (permalink / raw) To: 49611 #+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 and #+BEGIN_EXAMPLE $ find -L /run/current-system -name regulatory.db /run/current-system/profile/lib/firmware/regulatory.db #+END_EXAMPLE ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <handler.49611.B.16265582421408.ack@debbugs.gnu.org>]
* bug#49611: Acknowledgement (Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db`) [not found] ` <handler.49611.B.16265582421408.ack@debbugs.gnu.org> @ 2021-07-17 21:49 ` Katherine Cox-Buday 0 siblings, 0 replies; 8+ messages in thread From: Katherine Cox-Buday @ 2021-07-17 21:49 UTC (permalink / raw) To: 49611 Attempting to do this manually with crda fails as well: #+BEGIN_EXAMPLE $ guix environment --ad-hoc crda [env] $ sudo COUNTRY=US crda Failed to set regulatory domain: -7 #+END_EXAMPLE On Sat, Jul 17, 2021 at 4:45 PM GNU bug Tracking System <help-debbugs@gnu.org> wrote: > > Thank you for filing a new bug report with debbugs.gnu.org. > > This is an automatically generated reply to let you know your message > has been received. > > Your message is being forwarded to the package maintainers and other > interested parties for their attention; they will reply in due course. > > Your message has been sent to the package maintainer(s): > bug-guix@gnu.org > > If you wish to submit further information on this problem, please > send it to 49611@debbugs.gnu.org. > > Please do not send mail to help-debbugs@gnu.org unless you wish > to report a problem with the Bug-tracking system. > > -- > 49611: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49611 > GNU Bug Tracking System > Contact help-debbugs@gnu.org with problems ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` 2021-07-17 21:43 bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` Katherine Cox-Buday [not found] ` <handler.49611.B.16265582421408.ack@debbugs.gnu.org> @ 2021-07-18 17:47 ` Brice Waegeneire 2021-07-18 19:17 ` Guillaume Le Vaillant 1 sibling, 1 reply; 8+ messages in thread From: Brice Waegeneire @ 2021-07-18 17:47 UTC (permalink / raw) To: Katherine Cox-Buday; +Cc: 49611 Hello Katherine, TL;DR: “iw reg set US” correctly set the regulatory region from userland but Guix can't set it just from the kernel. Katherine Cox-Buday <cox.katherine.e@gmail.com> 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¹. 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'.² 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 “/sys/module/firmware_class/parameters/path”. ¹ https://cateee.net/lkddb/web-lkddb/CFG80211_INTERNAL_REGDB.html ² https://wireless.wiki.kernel.org/en/developers/regulatory/crda#changing_regulatory_domains Cheers, - Brice ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` 2021-07-18 17:47 ` bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` Brice Waegeneire @ 2021-07-18 19:17 ` Guillaume Le Vaillant 2021-07-19 18:21 ` Katherine Cox-Buday 0 siblings, 1 reply; 8+ messages in thread From: Guillaume Le Vaillant @ 2021-07-18 19:17 UTC (permalink / raw) To: Katherine Cox-Buday; +Cc: 49611, Brice Waegeneire [-- Attachment #1: Type: text/plain, Size: 1552 bytes --] Brice Waegeneire <brice@waegenei.re> skribis: > Hello Katherine, > > TL;DR: “iw reg set US” correctly set the regulatory region from userland > but Guix can't set it just from the kernel. > > Katherine Cox-Buday <cox.katherine.e@gmail.com> 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¹. > 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'.² > > 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. Hi, You could also try adding "cfg80211.ieee80211_regdom=US" to the 'kernel-arguments' field of your 'operating-system' definition. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` 2021-07-18 19:17 ` Guillaume Le Vaillant @ 2021-07-19 18:21 ` Katherine Cox-Buday 2021-07-19 21:17 ` Guillaume Le Vaillant ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Katherine Cox-Buday @ 2021-07-19 18:21 UTC (permalink / raw) To: Guillaume Le Vaillant; +Cc: 49611, Brice Waegeneire Thank you both! I was not aware that this belonged in the firmware field and not the packages field. This has solved the error message during boot. Further, adding the kernel argument successfully sets my region as US on boot. tags 49611 notabug close 49611 This is not part of the bug per-say, but a question around this space: despite all of this, I still cannot broadcast on US approved channels. I think this is because the EEPROM on the card is set as global. What am I missing? Do you know how Linux intend for people to notify the stack that this is an OK thing to do? I know projects like OpenWRT carry patches to the driver, but I keep thinking surely this is not the only way. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` 2021-07-19 18:21 ` Katherine Cox-Buday @ 2021-07-19 21:17 ` Guillaume Le Vaillant 2021-08-09 23:40 ` Tom Fitzhenry 2021-08-09 23:45 ` Tom Fitzhenry 2 siblings, 0 replies; 8+ messages in thread From: Guillaume Le Vaillant @ 2021-07-19 21:17 UTC (permalink / raw) To: Katherine Cox-Buday; +Cc: 49611, Brice Waegeneire [-- Attachment #1: Type: text/plain, Size: 1144 bytes --] Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis: > Thank you both! I was not aware that this belonged in the firmware > field and not the packages field. This has solved the error message > during boot. Further, adding the kernel argument successfully sets my > region as US on boot. > > tags 49611 notabug > close 49611 > > This is not part of the bug per-say, but a question around this space: > despite all of this, I still cannot broadcast on US approved channels. > I think this is because the EEPROM on the card is set as global. What > am I missing? Do you know how Linux intend for people to notify the > stack that this is an OK thing to do? I know projects like OpenWRT > carry patches to the driver, but I keep thinking surely this is not > the only way. Some WiFi devices can have extra EEPROM-based restrictions if they don't implement some features. I have a WiFi card that I can't use as access point on the 5 GHz band because it doesn't implement radar detection, which is apparently mandatory on this band to avoid causing interference. Luckily I have another device based on a different chipset where it just works. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` 2021-07-19 18:21 ` Katherine Cox-Buday 2021-07-19 21:17 ` Guillaume Le Vaillant @ 2021-08-09 23:40 ` Tom Fitzhenry 2021-08-09 23:45 ` Tom Fitzhenry 2 siblings, 0 replies; 8+ messages in thread From: Tom Fitzhenry @ 2021-08-09 23:40 UTC (permalink / raw) To: 49611 On 20/07/2021 04:21, Katherine Cox-Buday wrote: > I think this is because the EEPROM on the card is set as global. What > am I missing? Do you know how Linux intend for people to notify the > stack that this is an OK thing to do? I know projects like OpenWRT > carry patches to the driver, but I keep thinking surely this is not > the only way. https://github.com/pcengines/apu2-documentation/issues/189 tracks this issue for PC Engines, which retails wireless cards whose EEPROM uses a global region. My poor understanding is that Linux does not offer a way for end users to override the EEPROM, per "It should be reasonably impossible for a user to fail to comply with local regulations either unwittingly or by accident."[0] It looks like the two supported ways to set regulatory domain are: * a card vendor/retailer that performs certification, and flashes the EEPROM. * a system integrator (e.g. off-the-shelf wireless routers, mobile phones, etc.) that performs certification and sets CONFIG_CFG80211_CERTIFICATION_ONUS. Linux does offer a way to indicate your current region via CRDA[1], but this is for the "travelling in another country" usecase, and acts to restrict the driver to intersection(EEPROM, country). 0. https://wireless.wiki.kernel.org/en/developers/regulatory/statement 1. https://wireless.wiki.kernel.org/en/developers/regulatory ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` 2021-07-19 18:21 ` Katherine Cox-Buday 2021-07-19 21:17 ` Guillaume Le Vaillant 2021-08-09 23:40 ` Tom Fitzhenry @ 2021-08-09 23:45 ` Tom Fitzhenry 2 siblings, 0 replies; 8+ messages in thread From: Tom Fitzhenry @ 2021-08-09 23:45 UTC (permalink / raw) To: Katherine Cox-Buday, Guillaume Le Vaillant; +Cc: 49611, Brice Waegeneire On 20/07/2021 04:21, Katherine Cox-Buday wrote: > This is not part of the bug per-say, but a question around this space: > despite all of this, I still cannot broadcast on US approved channels. > I think this is because the EEPROM on the card is set as global. What > am I missing? Do you know how Linux intend for people to notify the > stack that this is an OK thing to do? I know projects like OpenWRT > carry patches to the driver, but I keep thinking surely this is not > the only way. https://github.com/pcengines/apu2-documentation/issues/189 tracks this issue for PC Engines, which retails wireless cards whose EEPROM uses a global region. Disclaimer: I don't understand this well. My understanding is that Linux does not offer a way for end users to override the EEPROM, per "It should be reasonably impossible for a user to fail to comply with local regulations either unwittingly or by accident."[0] I can see two supported ways to set the regulatory domain: * a card vendor/retailer performs certification, and flashes the EEPROM accordingly. * a system integrator (e.g. off-the-shelf wireless routers, mobile phones, etc.) performs certification and sets CONFIG_CFG80211_CERTIFICATION_ONUS. Linux does offer a way to indicate your current region via CRDA[1], but this is for the "travelling in another country" usecase, and acts to restrict the driver to intersection(EEPROM, country). 0. https://wireless.wiki.kernel.org/en/developers/regulatory/statement 1. https://wireless.wiki.kernel.org/en/developers/regulatory ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-08-10 20:42 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-07-17 21:43 bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` Katherine Cox-Buday [not found] ` <handler.49611.B.16265582421408.ack@debbugs.gnu.org> 2021-07-17 21:49 ` bug#49611: Acknowledgement (Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db`) Katherine Cox-Buday 2021-07-18 17:47 ` bug#49611: Despite wireless-regdb being installed in my operating-system, dmesg indicates it can't find `regulatory.db` Brice Waegeneire 2021-07-18 19:17 ` Guillaume Le Vaillant 2021-07-19 18:21 ` Katherine Cox-Buday 2021-07-19 21:17 ` Guillaume Le Vaillant 2021-08-09 23:40 ` Tom Fitzhenry 2021-08-09 23:45 ` Tom Fitzhenry
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.