Hm, I thought I advised not doing this at all :)
Anyway, if we were to add this, you might want to:
> +
> +/* kobject stuff */
> +
> +/* We define only the base subsystem here and leave everything to a LSM. It is
> + * heavily recommended that the LSM should create own subsystem under this one,
> + * so that it can be easily made stackable and it doesn't confuse userland by
> + * exporting its stuff directly to /sys/security/. */
> +decl_subsys(security,NULL);
Add a prototype of this variable to security.h so that everyone can
actually see it who wants to use it.
> +/**
> + * security_kobj_init - initializes the security kobject subsystem
> + *
> + * This is called after security_scaffolding_startup as a regular initcall,
> + * since we need sysfs mounted already.
> + */
> +static int __init security_kobj_init (void)
> +{
> + subsystem_register (&security_subsys);
> + return 0;
> +}
> +
> +subsys_initcall(security_kobj_init);
Why not initialize this when the security core is initialized? Why
have a new initcall?
And when do you unregister this subsystem?
> +EXPORT_SYMBOL(security_subsys);
No EXPORT_SYMBOL_GPL() for it? :)
thanks,
greg k-h
-
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/