oshaked1/ghoul

Trying to `rmmod ghoul` reveals its existence

Closed this issue · 1 comments

If ghoul is loaded and hidden, trying to run sudo rmmod ghoul will reveal its existence with an unusual error message.
The error message returned is:

rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'ghoul': No such file or directory
rmmod: ERROR: could not remove module ghoul: No such file or directory

The expected error message (for unloading a module which isn't loaded):

rmmod: ERROR: Module ghoul is not currently loaded

This was fixed by hiding the module from sysfs (see #12)