• shirro@aussie.zone
    link
    fedilink
    English
    arrow-up
    21
    ·
    7 days ago

    In the 90s I compiled all my kernels at home from source with just the drivers I needed. Only installed the packages I needed. Only enabled the services I needed. The Unix way. When the kernel added modules I was still only compiling a subset and generally loading them manually.

    Obviously that doesn’t work for most users and distros sensibly started shipping with modules compiled for practically every need. Usually when I view distro security alerts they are for packages I don’t install. But I have all these damn kernel modules just waiting to automatically load. I know I can blacklist them individually but I wonder if there is a way to profile the modules I use and use a deny all/whitelist approach instead?

    • mlfh@lm.mlfh.org
      link
      fedilink
      English
      arrow-up
      13
      ·
      edit-2
      7 days ago

      modprobed-db can create a profile of the kernel modules that get loaded by your system over time. You can feed that directly into make localmodconfig to build a kernel that only includes those modules, or use the data to build a modprobe whitelist.