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]
Date:	Thu, 13 Jan 2011 11:55:28 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	David Miller <davem@...emloft.net>
Cc:	sam@...nborg.org, linux-kernel@...r.kernel.org,
	sparclinux@...r.kernel.org
Subject: Re: sparc boot failure due to perf init

On Sun, 2011-01-09 at 15:37 -0800, David Miller wrote:
> sparc64: Fix bootup regression due to perf init ordering.
> 
> Commit 004417a6d468e24399e383645c068b498eed84ad
> ("perf, arch: Cleanup perf-pmu init vs lockup-detector")
> move the perf events init to be an early_initcall.
> 
> But this won't work properly unless the dependencies for
> this code initialize beforehand.
> 
> Fix it by making cpu_type_probe and pcr_arch_init be
> an early_initcall as well.
> 
> Reported-by: Sam Ravnborg <sam@...nborg.org>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> ---
>  arch/sparc/kernel/cpu.c |    2 +-
>  arch/sparc/kernel/pcr.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
> index e447938..0dc714f 100644
> --- a/arch/sparc/kernel/cpu.c
> +++ b/arch/sparc/kernel/cpu.c
> @@ -375,5 +375,5 @@ static int __init cpu_type_probe(void)
>         return 0;
>  }
>  
> -arch_initcall(cpu_type_probe);
> +early_initcall(cpu_type_probe);
>  #endif
> diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c
> index b87873c..ae96cf5 100644
> --- a/arch/sparc/kernel/pcr.c
> +++ b/arch/sparc/kernel/pcr.c
> @@ -168,4 +168,4 @@ out_unregister:
>         return err;
>  }
>  
> -arch_initcall(pcr_arch_init);
> +early_initcall(pcr_arch_init);


I just realized, doesn't this make bootability depend on link order?
Since both the pmu init and its dependencies are now early_initcall()
how do we guarantee pcr_arch_init() and cpu_type_probe() are in fact
called _before_ init_hw_perf_events()?
--
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