Re: [PATCH] allow disabling IMA at runtime
From: Rusty Russell
Date: Thu Aug 27 2009 - 06:19:30 EST
On Thu, 27 Aug 2009 09:32:25 am Andrew Morton wrote:
> From my reading of kernel/params.c:parse_args(), every __setup()
> function which returns `1' should result in printk("%s: `%s' invalid
> for parameter `%s'), so I'm all confused and giving up.
Nope, it's an "obsolete_param", so non-zero means success.
> > +__setup("ima=", ima_enabled);
>
> Are we supposed to use core_param() nowadays?
Yeah, if this had backwards compatibility requirements. But for new,
non-core params like this:
1) make sure the module is called "ima" (even if not a module: make the
object ima.o)
2) use module_param(), and make your parameters "disable" and "audit"
(ima_disable and ima_audit if must be nonstatic and use module_param_named).
You don't need to write any parse functions at all!
3) Tell users to use ima.disable and ima.audit.
Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/