|
From: Timothy L. <la...@ww...> - 2002-04-02 03:59:03
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 2 Apr 2002, 4lj wrote:
Hey!
> Hi, all.
>
> I found a little problem in delete module process.
> First, it isn't check delete_module_return in sm_delete_module().
> if non-root user type "rmmod foo", original delete module function
> returns -EPERM. So after sm_remove_module_list() destory module
> list integrity. it should be check delete_module_return.
>
> if (delete_module_return == 0)
> sm_remove_module_list();
>
Ouch. I have patched the CVS with this one. I will include it
in a interum patch, along with other changes by friday.
>
> Next, if anyone unload StMichael.o, current implementaion
> returns -EBUSY. In the case compiled with CLOAK option,
> it is better to return -ENOENT.
Intresting issue, I have modified your solution to
actually shortcut out the "StMichael" check if
CLOAK is defined. In playing with this just now,
in cloak mode it is possible to actually load another
module called "StMichael", and not be able to remove it.
Test: insmod StMichael.o
mv StMichael.o StMichael.old.o
cp /lib/modules/`uname -r`/kernel/drivers/net/dummy.o StMichael.o
insmod StMichael.o
Since the Cloaking causes the module entry for StMichael to
be removed -- its name may be loaded again.
Attempting to remove it would generate a "-ENOENT"
when we can do an lsmod and see the module is there.
I have modified your fix to read as follows:
#if defined(CLOAK)
if (name != NULL && *name != '\0')
{
if ( ! sm_strncmp(name,"StMichael", 12) )
{
return -EBUSY;
}
}
#endif
Thanks,
- --Tim
PS. I am trying to move this project to being more community
supported. I will be posting information about where patches
will be posted. I hope to be able to do at least weekly patches
for smaller issues untill I have a chance to get a CVS setup
for this project (on a site other then sourceforge).
- --
Tim Lawless Email: [ la...@ww... , la...@ne... ]
GPG Key: http://www.wwjh.net/~lawless/gpgkey.asc
GPG Fingerprint: 2764 E9CA BE7F 7876 95CB 6249 37EB FD88 20F5 8047
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8qSunN+v9iCD1gEcRAu9DAKDfouLzGCVae3LyrAzWnbJGx/899wCeOemI
wRocPhV7mQBXZmKwuoyiW5c=
=PSqT
-----END PGP SIGNATURE-----
|