lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54BEA0EE.10304@redhat.com>
Date:	Tue, 20 Jan 2015 13:39:42 -0500
From:	Prarit Bhargava <prarit@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Rusty Russell <rusty@...tcorp.com.au>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Fabian Frederick <fabf@...net.be>,
	Johannes Weiner <hannes@...xchg.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH] init/main.c: Simplify initcall_blacklisted()



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@...hat.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.
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ