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: <20081104094831.GP23790@elte.hu>
Date:	Tue, 4 Nov 2008 10:48:31 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Rakib Mullick <rakib.mullick@...il.com>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] kernel/cpu.c: Section mismatch warning fix.


* Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Thu, 30 Oct 2008 10:04:54 +0600
> "Rakib Mullick" <rakib.mullick@...il.com> wrote:
> 
> >  LD      kernel/built-in.o
> > WARNING: kernel/built-in.o(.text+0xb7c8): Section mismatch in
> > reference from the function notify_cpu_starting() to the variable
> > .cpuinit.data:cpu_chain
> > The function notify_cpu_starting() references
> > the variable __cpuinitdata cpu_chain.
> > This is often because notify_cpu_starting lacks a __cpuinitdata
> > annotation or the annotation of cpu_chain is wrong.
> > 
> > This patch fixes the above section mismatch warning. If anything else
> > please notice.
> > Thanks.
> > 
> > Signed-off-by: Md.Rakib H. Mullick <rakib.mullick@...il.com>
> > 
> > --- linux-2.6-orig/kernel/cpu.c	2008-10-28 20:52:38.000000000 +0600
> > +++ linux-2.6/kernel/cpu.c	2008-10-28 22:46:22.000000000 +0600
> > @@ -462,7 +462,7 @@ out:
> >   * It must be called by the arch code on the new cpu, before the new cpu
> >   * enables interrupts and before the "boot" cpu returns from __cpu_up().
> >   */
> > -void notify_cpu_starting(unsigned int cpu)
> > +void __cpuinit notify_cpu_starting(unsigned int cpu)
> >  {
> >  	unsigned long val = CPU_STARTING;
> 
> arch/alpha/kernel/smp.c calls notify_cpu_starting() from __init code.
> 
> arch/cris/arch-v32/kernel/smp.c calls notify_cpu_starting() from __init code.
> 
> arch/x86/mach-voyager/voyager_smp.c calls notify_cpu_starting() from
> __init code.
> 
> arch/m32r/kernel/smpboot.c calls notify_cpu_starting() from __init code.
> 
> arch/sparc/kernel/sun4d_smp.c calls notify_cpu_starting() from __init code.
> 
> arch/powerpc/kernel/smp.c calls notify_cpu_starting() from __devinit
> code.
> 
> arch/um/kernel/smp.c calls notify_cpu_starting() from .text code.
> 
> 
> The other nine callers call notify_cpu_starting() from __cpuinit code.
> 
> 
> What a mess.

__cpuinit seems safe for all but UML.

But even for UML it appears to be de-facto safe: as after bootup we 
never return back into arch/um/kernel/smp.c::idle_proc(). (as UML's 
default_idle() is an infinite loop)

Yesterday i've queued it up in tip/core/urgent:

  685aebb: kernel/cpu.c: section mismatch warning fix

to be pushed to Linus today-ish. Any objections?

	Ingo
--
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