Hi,
On Wed, 20 Nov 2002, Petr Vandrovec wrote:
> ... now when we have setxattr() in kernel, what about using
> setxattr() on module directory instead of separate control file?
> I know, you cannot manage it with "echo" then, but it looks
A normal file is easier for testing.
> strange that mkdir automatically creates control file while
> rmdir does not remove it automatically... and without control
Indeed, rmdir should probably also remove the control file.
> You are skipping security_ops hooks. Can you use vfs_mkdir() instead
> of modfs_mkdir(), just to make sure that if someone adds some new
> features into vfs_mkdir(), you'll not miss them ?
The system calls are only a temporary solution, so skipping security hooks
is no real loss. :)
> And one minor comment: do you really need both module_dir->module
> and module_data->module? Do you use it only to make sure that
> sys_delete_module will not operate on modules not created by
> sys_init_module?
module_dir->module is an optimization to get quickly to the module file
created by sys_create_module(). module_data->module is the pointer to the
real module data.
> It has unfortunate feature that sys_create_module();
> sys_delete_module() (without suceeding sys_init_module between
> them) will return -ENOENT, and you'll have to use rm/rmdir to get
> rid of module :-(
As the system calls are only temporary, they don't have to be perfect, but
why should it return -ENOINT, AFAICS it should fail for other reason.
Anyway, the module state management needs a overhaul, this is just a
copy&paste from the old code.
bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:34 EST