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: <20080623205722.GA3580@ds20.borg.net>
Date:	Mon, 23 Jun 2008 20:57:22 +0000
From:	Thorsten Kranzkowski <dl8bcu@...bcu.de>
To:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Richard Henderson <rth@...ddle.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] alpha: fix module load failures on smp (bug #10926)

On Sat, Jun 21, 2008 at 03:25:39AM +0400, Ivan Kokshaysky wrote:
> To calculate addresses of locally defined variables, GCC uses 32-bit
> displacement from the GP. Which doesn't work for per cpu variables in
> modules, as an offset to the kernel per cpu area is way above 4G.
> 
> The workaround is to force allocation of a GOT entry for per cpu variable
> using ldq instruction with a 'literal' relocation.
> I had to use custom asm/percpu.h, as a required argument magic doesn't
> work with asm-generic/percpu.h macros.
> 
> Signed-off-by: Ivan Kokshaysky <ink@...assic.park.msu.ru>
> ---
>  include/asm-alpha/percpu.h |   72 +++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 71 insertions(+), 1 deletions(-)


This causes a regression for my ev4 uniprocessor build:


  CC      arch/alpha/mm/init.o
/export/data/repositories/linux-2.6/arch/alpha/mm/init.c:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typeof’
make[2]: *** [arch/alpha/mm/init.o] Error 1
make[1]: *** [arch/alpha/mm] Error 2
make: *** [sub-make] Error 2


This patch fixes it for me (compile and boot tested):


diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h
index 82e8a94..3495e8e 100644
--- a/include/asm-alpha/percpu.h
+++ b/include/asm-alpha/percpu.h
@@ -69,6 +69,8 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
 #define __get_cpu_var(var)		per_cpu_var(var)
 #define __raw_get_cpu_var(var)		per_cpu_var(var)
 
+#define PER_CPU_ATTRIBUTES
+
 #endif /* SMP */
 
 #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name)


Signed-off-by: Thorsten Kranzkowski <dl8bcu@...bcu.de>

Thorsten.

-- 
| Thorsten Kranzkowski        Internet: dl8bcu@...bcu.de                      |
| Mobile: ++49 170 1876134       Snail: Kiebitzstr. 14, 49324 Melle, Germany  |
| Ampr: dl8bcu@...lj.#rpl.deu.eu, dl8bcu@...vin.dl8bcu.ampr.org [44.130.8.19] |
--
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