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:	Fri, 7 Nov 2008 12:40:17 -0600 (CST)
From:	Christoph Lameter <cl@...ux-foundation.org>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
cc:	Alexey Dobriyan <adobriyan@...il.com>, linux-next@...r.kernel.org,
	linux-kernel@...r.kernel.org, rusty@...tcorp.com.au,
	Haavard Skinnemoen <hskinnemoen@...el.com>
Subject: Re: next-20081106: undefined reference to `__per_cpu_start'

On Fri, 7 Nov 2008, Stephen Rothwell wrote:

> > Or did you use generic percpu support and set
> > CONFIG_HAVE_ZERO_BASED_PER_CPU?
>
> Also a avr32 allnoconfig
> (http://kisskb.ellerman.id.au/kisskb/buildresult/53233/) gets:
>
> backing-dev.c:(.init.text+0xc4c): undefined reference to `__per_cpu_start'
> backing-dev.c:(.init.text+0xc50): undefined reference to `__per_cpu_end'
>
> and avr32 defconfig
> (http://kisskb.ellerman.id.au/kisskb/buildresult/53225/) gets:
>
> vmstat.c:(.init.text+0xff0): undefined reference to `__per_cpu_start'
> vmstat.c:(.init.text+0xff4): undefined reference to `__per_cpu_end'

All of these have no invocation of the PERCPU macro from
asm-generic/vmlinus.lds.h in their arch vmlinux.lds.S. Thus the symbols
are missing. They are kind of irrelevant since we are only interested in
the difference between those...

Either we add the PERCPU() macro invocations to each arches vmlinux.lds.S
file or we need to special case each time __per_cpu_end/__start is used.
The only use added for the cpu allocator is in include/linux/percpu.h

Make it conditional on CONFIG_SMP

Signed-off-by: Christoph Lameter <cl@...ux-foundation.org>

Index: linux-next/include/linux/percpu.h
===================================================================
--- linux-next.orig/include/linux/percpu.h	2008-11-06 10:03:22.985665656 -0600
+++ linux-next/include/linux/percpu.h	2008-11-07 12:38:06.223165740 -0600
@@ -61,8 +61,13 @@
 #ifndef PERCPU_AREA_SIZE
 #define PERCPU_RESERVE_SIZE	8192

+#ifdef CONFIG_SMP
 #define PERCPU_AREA_SIZE						\
 	(__per_cpu_end - __per_cpu_start + percpu_reserve)
+#else
+#define PERCPU_AREA_SIZE percpu_reserve
+#endif
+
 #endif	/* PERCPU_AREA_SIZE */

 /*

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