Messages in this thread | | | Date | Tue, 20 Jan 2015 19:05:14 +0100 | From | Oleg Nesterov <> | Subject | Re: [RFC/PATCH] init/main.c: Simplify initcall_blacklisted() |
| |
On 01/20, Prarit Bhargava wrote: > > On 01/19/2015 08:05 PM, Rusty Russell wrote: > > Oleg Nesterov <oleg@redhat.com> writes: > >> > >> If we want to optimize this... I am wondering if we can change > >> initcall_blacklist() > >> > >> - entry->buf = alloc_bootmem(strlen(str_entry) + 1); > >> + ebtry->fn = kallsyms_lookup_name(str_entry); > >> > >> and then change initcall_blacklisted() to just compare the pointers. > > > > That would make far, far more sense. It would fail for modules of > > course, but that might be OK. Prarit, this was your code; does it > > matter? > > It does actually matter to me. I've been using it to blacklist modules at boot > as well ... and it works really well :) So I'm okay with the original patch but > not the second suggested change.
Yes, I didn't know/realize that initcall_blacklist paramater can be also used to disable the modules, thanks for correcting me.
But I'd say that initcall_blacklisted(mod->init) looks a bit strange, I mean it would be probably better to use mod->name in this case, not the "internal" name of this likely static function.
Perhaps even another kernel parameter makes sense for this, I dunno.. From Documentation/kernel-parameters.txt:
initcall_blacklist= [KNL] Do not execute a comma-separated list of initcall functions. Useful for debugging built-in modules and initcalls.
note that this only mentions built-in modules.
Nevermind, I was wrong anyway. Thanks!
Oleg.
| |