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] [day] [month] [year] [list]
Date:	Tue, 17 Jun 2008 16:43:25 +0200
From:	"Vegard Nossum" <vegard.nossum@...il.com>
To:	"Mathieu Desnoyers" <compudj@...stal.dyndns.org>
Cc:	"Eduard - Gabriel Munteanu" <eduard.munteanu@...ux360.ro>,
	tzanussi@...il.com, linux-kernel@...r.kernel.org,
	penberg@...helsinki.fi, akpm@...ux-foundation.org,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH 2/3] Better interface for hooking early initcalls.

On Tue, Jun 17, 2008 at 4:07 PM, Mathieu Desnoyers
<compudj@...stal.dyndns.org> wrote:
> * Eduard - Gabriel Munteanu (eduard.munteanu@...ux360.ro) wrote:
>> Added early initcall (pre-SMP) support, using an identical interface to
>> that of regular initcalls. Functions called from do_pre_smp_initcalls()
>> could be converted to use this cleaner interface.
>>
>> This is required by CPU hotplug, because early users have to register
>> notifiers before going SMP. One such CPU hotplug user is the relay
>> interface with buffer-only channels, which needs to register such a
>> notifier, to be usable in early code. This in turn is used by kmemtrace.
>>
>
> I am not sure it's worth it trying to define a generic "early" initcall,
> since definition of "how early it is" may change with time.
>
> Currently, it's earlier than SMP init, but later on, it could become
> earlier than mm init. If there are only few users of this, and given
> that they must be designed "knowing" how early they are initialized wrt
> other subsystems, I think it would make sense to call them directly from
> the init code without putting them in a "early initcall" category.

If this existed already, I'd use it for kmemcheck. We need to hook
into what happens just before SMP is initialized in order to set
maxcpus = 1 depending on some kernel parameter. Right now it's called
directly from do_pre_smp_initcalls():

@@ -779,6 +780,7 @@ static void __init do_pre_smp_initcalls(void)
 {
        extern int spawn_ksoftirqd(void);

+       kmemcheck_init();
        migration_init();
        spawn_ksoftirqd();
        if (!nosoftlockup)

With proposed patch, we wouldn't have to touch this file at all, so
for what it's worth, consider it acked by me.


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
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