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:	Mon, 3 Nov 2008 11:15:21 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kernel/cpu.c: Section mismatch warning fix.


* Rakib Mullick <rakib.mullick@...il.com> wrote:

> On 10/31/08, Ingo Molnar <mingo@...e.hu> wrote:
> >
> > * Rakib Mullick <rakib.mullick@...il.com> wrote:
> >
> >
> > you've tested that on x86, right? Have you checked/reviewed all the
> > non-x86 architecture codepaths:
> >
> >  ./arch/m32r/kernel/smpboot.c:	notify_cpu_starting(cpu_id);
> >  ./arch/cris/arch-v32/kernel/smp.c:	notify_cpu_starting(cpu);
> >  ./arch/s390/kernel/smp.c:	 notify_cpu_starting(smp_processor_id());
> >  ./arch/x86/mach-voyager/voyager_smp.c:	notify_cpu_starting(cpuid);
> >  ./arch/x86/kernel/smpboot.c:	notify_cpu_starting(cpuid);
> >  ./arch/mips/kernel/smp.c:	notify_cpu_starting(cpu);
> >  ./arch/sparc64/kernel/smp.c:	notify_cpu_starting(cpuid);
> >  ./arch/ia64/kernel/smpboot.c:	notify_cpu_starting(cpuid);
> >  ./arch/um/kernel/smp.c:	notify_cpu_starting(cpu);
> >  ./arch/sparc/kernel/sun4d_smp.c:	notify_cpu_starting(cpuid);
> >  ./arch/sparc/kernel/sun4m_smp.c:	notify_cpu_starting(cpuid);
> >  ./arch/powerpc/kernel/smp.c:	notify_cpu_starting(cpu);
> >  ./arch/alpha/kernel/smp.c:	notify_cpu_starting(cpuid);
> >  ./arch/sh/kernel/smp.c:	notify_cpu_starting(smp_processor_id());
> >  ./arch/arm/kernel/smp.c:	notify_cpu_starting(cpu);
> >
> > to make sure that they never use this function after free_initmem()?
>
> Above codepaths are basically called during initialization, where 
> all the CPU's are initiated. When we complete the initial bootup 
> then free_initmem is called. So, If i'm not wrong they're not using 
> this function after free_initmem().And notify_cpu_started(cpuid) is 
> declared when CPU_HOTPLUG is not set. So, It's safe also from CPU 
> hotpluging POV. Am I missing anything?

no, you are right - applied your patch to tip/core/urgent (see the 
full commit below). Just wanted to raise the question because your 
changelog did not include an analysis of the situation.

	Ingo

--------------------------->
>From 685aebb5fb26126e9be708cfed30e5ee20033c95 Mon Sep 17 00:00:00 2001
From: Rakib Mullick <rakib.mullick@...il.com>
Date: Thu, 30 Oct 2008 10:04:54 +0600
Subject: [PATCH] kernel/cpu.c: section mismatch warning fix

Impact: small kernel .text reduction in certain configs, and fix warning

This warning:

  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.

Points out the fact that notify_cpu_starting() is only called
from __cpuinit sequences and itself uses a __cpuinitdata structure.

This patch fixes the above section mismatch warning.

Signed-off-by: Md.Rakib H. Mullick <rakib.mullick@...il.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 86d4904..2e53420 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -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;
 
--
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