From: Prarit Bhargava <prarit@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Fabian Frederick <fabf@skynet.be>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC/PATCH] init/main.c: Simplify initcall_blacklisted()
Date: Tue, 20 Jan 2015 13:39:42 -0500 [thread overview]
Message-ID: <54BEA0EE.10304@redhat.com> (raw)
In-Reply-To: <20150120180514.GA23205@redhat.com>
On 01/20/2015 01:05 PM, Oleg Nesterov wrote:
> 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.
I didn't have that in mind originally, but I've been using it to debug initramfs
module loading. It has worked quite well.
>
> 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.
:) I've been thinking about exactly this too. I just haven't had any time to
do it.
>
> 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.
I can fix that up too.
P.
>
> Nevermind, I was wrong anyway. Thanks!
>
> Oleg.
>
next prev parent reply other threads:[~2015-01-20 18:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-17 0:25 [RFC/PATCH] init/main.c: Simplify initcall_blacklisted() Rasmus Villemoes
2015-01-19 19:19 ` Oleg Nesterov
2015-01-20 1:05 ` Rusty Russell
2015-01-20 10:49 ` Prarit Bhargava
2015-01-20 18:05 ` Oleg Nesterov
2015-01-20 18:39 ` Prarit Bhargava [this message]
2016-03-21 23:14 ` [PATCH resend] " Rasmus Villemoes
2016-03-22 3:27 ` Rusty Russell
2016-03-23 23:54 ` Rasmus Villemoes
2016-03-24 17:16 ` Prarit Bhargava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54BEA0EE.10304@redhat.com \
--to=prarit@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=geert@linux-m68k.org \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).