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: <1290696476.2145.46.camel@laptop>
Date:	Thu, 25 Nov 2010 15:47:56 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Lin Ming <ming.m.lin@...el.com>,
	Stephane Eranian <eranian@...gle.com>,
	"robert.richter" <robert.richter@....com>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	fweisbec <fweisbec@...il.com>, paulus <paulus@...ba.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Kay Sievers <kay.sievers@...y.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Kyle Moffett <kyle@...fetthome.net>,
	linux-kernel@...r.kernel.org, davem <davem@...emloft.net>,
	Michael Cree <mcree@...on.net.nz>,
	Deng-Cheng Zhu <dengcheng.zhu@...il.com>,
	Will Deacon <will.deacon@....com>,
	Paul Mundt <lethal@...ux-sh.org>,
	Don Zickus <dzickus@...hat.com>
Subject: Re: [RFC][PATCH 2/8] perf, arch: Use early_initcall() for all arch
 pmu implementations

On Thu, 2010-11-25 at 11:25 +0100, Peter Zijlstra wrote:
> 
> Right, so hw perf init happens from (after this patch):
> 
>  arch_initcall: powerpc, arm, sh, mips
>  early_initcall: x86, sparc, alpha
> 
> 
> Now the problem is that the generic watchdog code (kernel/watchdog.c)
> tries to create hw perf events, and that too runs from early_initcall.
> 
> So my question is, how do we go about curing this, because powerpc, arm,
> sh and mips are too late and the rest depends on link order to work, not
> really a nice situation.
> 
> There's two categories of solutions:
>  - move the watchdog later, and
>  - move the hw perf init earlier.
> 
> The former is undesired because we want the watchdog as early as
> possible, the later needs new infrastructure (also, I don't know if the
> arch implementations can actually run this early).
> 
> So do I create a perf_initcall() or is there another solution that
> avoids things like calling the watchdog code from all arch init code? 

How about something like these? After this we could even look at making
the watchdog code an explicit init in main.c right after
do_perf_initcalls() (or later if it requires more to be up and running).



Hrm,. except that it all builds but doesn't seem to actually work, I
guess I need more magics to make the perf_initcall() thing work.

/me goes investigate



View attachment "perf_initcall.patch" of type "text/x-patch" (3856 bytes)

View attachment "perf-fix-hw-init.patch" of type "text/x-patch" (12783 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ