2

I have certain Broadcom drivers clearly blacklisted in 50-broadcom-wl-blacklist.conf file in /etc/modprobe.d/:

# modules blacklisted for broadcom-wl
blacklist bcm43xx
blacklist ssb
blacklist b43
blacklist b43legacy
blacklist ndiswrapper
blacklist brcm80211
blacklist bcma
blacklist brcmsmac

But they are still being loaded!

$ lsmod | grep b43
b43legacy             151552  0
b43                   450560  0
bcma                   61440  1 b43
mac80211              888832  2 b43,b43legacy
ssb                    86016  2 b43,b43legacy
mmc_core              163840  2 b43,ssb
cfg80211              696320  4 wl,b43,mac80211,b43legacy

OS: openSUSE Leap 15

Some other posts mention running mkinitrd or dracut. When is this relevant for blacklisting modules?

Note, 50-broadcom-wl-blacklist.conf was probably created by some openSUSE tool, I don't remember creating it. Strange that tool wouldn't call a mkinitrd if it was necessary.

We are living in systemd era, but I don't think systemd is not relevant for blacklisting modules (yet).

I am blacklisting this modules because I have to use Broadcom proprietary STA driver with my bcm4360 chipset card.

1

1 Answer 1

0

So it turned out the blacklisted modules were explicitly loaded by one of Systemd / Network Manager services: pullin-bcm43xx-firmware.service.

I simply disabled the suspicious service via systemd call:
systemctl disable pullin-bcm43xx-firmware.service
and rebooted ..and voilà ..b43 drivers are not loaded anymore; ssb, b43, b43legacy, mac80211; only wl is present. Happy ending ..for now.

How I found pullin-bcm43xx-firmware.service? By a bit of detective work. By searching system log journalctl -b, searching for b43. I found this suspicious line:
install_bcm43xx_firmware_wrapper[1115]: Downloading b43 firmware
just after Network Manager started. Searching for install_bcm43xx_firmware_wrapper in /etc yielded /etc/systemd/system/multi-user.target.wants/pullin-bcm43xx-firmware.service ..and the rest you already know.

What is worring, I found it mostly by sheer luck. If that script didn't mention b43 and its name I would be able to make any links. It worrying that there is no formal log trace of which drivers are loaded when and by whom :(

I also learned that module blacklisting is a bit misnomer. As Arvidjaar clarified it for me:

Blacklist only prevents loading of module due to hardware autodetection (strictly speaking, it tells modprobe to ignore internal aliases provided by module). It does not prohibit loading of module by any other means (explicit modprobe, install line in modprobe.conf, explicit alias in modprobe.conf).

Kernel should have a proper enforceable blacklisting facility!

1
  • If you want to actively block the loading of a particular module, you can do it by adding install hated-module-name /bin/true to /etc/modprobe.d/*.conf. This overrides the usual modprobe command to load the module with /bin/true, and so an attempt to load the module will do nothing at all. Of course, if you are root (and the CAP_SYS_MODULE capability is not withdrawn) you can use modprobe -i, insmod or straight up make your own init_module(2) system call to load a module anyway...
    – telcoM
    Commented Nov 25, 2021 at 9:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .