1

Is there any way how to stop unused module to loadable kernel module other than putting them in the mod probe blacklist.

subbarao
  • 477
  • 3
    What is the problem with blacklisting? – jasonwryan Mar 31 '13 at 03:43
  • Kernel is not that smart yet – daisy Mar 31 '13 at 04:12
  • 1
    @jasonwryan i want to stop loading of external modules i.e. related to application or os or whatever it may be. my intention is that no one should insert module using insmod/modprobe after booting. – subbarao Mar 31 '13 at 04:56
  • @jasonwryan if i know which module i am inserting i can put it in blacklist but i want to generalize so that whatever module it is it can't be loadable. i mean i want to block loading of modules. – subbarao Mar 31 '13 at 04:59
  • any one reply me – subbarao Mar 31 '13 at 05:25
  • @subbarao writing udev rules for loading / unloading kernel modules might be helpful. https://wiki.archlinux.org/index.php/Udev – sundeep Mar 31 '13 at 05:27
  • @sundeep Thankyou sundeep, can you give any small example kind of udev rule. – subbarao Mar 31 '13 at 05:45
  • @subbarao: Whether you just want noone can execute insmod or modprobe command. – pradeepchhetri Mar 31 '13 at 10:25
  • @pradeepchhetri Thanks for your reply, i will check loadable modules options in kernel and after booting i don't want to allow any modules(application/os/anything) via insmod and modprobe. – subbarao Apr 01 '13 at 05:31

1 Answers1

0

If the kernel is loading modules that aren't needed, that is a bug, pure and simple. First make sure your "unused modules" aren't really dependencies for modules you are using, then find out how to reproduce it simply (hopefully without any closed source modules), and report it to your distribution.

Anything else is just papering over a problem, and might cause problems on its own.

vonbrand
  • 18,253