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:	Sun, 28 Jun 2009 15:39:40 +0400
From:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
To:	Tejun Heo <tj@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, max@...o.at,
	linux-kernel@...r.kernel.org, dhowells@...hat.com
Subject: Re: [PATCH] alpha: fix percpu build breakage

On Sun, Jun 28, 2009 at 09:49:56AM +0900, Tejun Heo wrote:
> alpha percpu access requires custom SHIFT_PERCPU_PTR() definition for
> modules to work around addressing range limitation.  This is done via
> generating inline assembly using C preprocessing which forces the
> assembler to generate external reference.  This happens behind the
> compiler's back and makes the compiler think that static percpu
> variables in modules are unused.
> 
> This used to be worked around by using __unused attribute for percpu
> variables which prevent the compiler from omitting the variable;
> however, recent declare/definition attribute unification change broke
> this as __used can't be used for declaration.  Also, in the process,
> PER_CPU_ATTRIBUTES definition in alpha percpu.h got broken.
> 
> This patch adds PER_CPU_DEF_ATTRIBUTES which is only used for
> definitions and make alpha use it to add __used for percpu variables
> in modules.  This also fixes the PER_CPU_ATTRIBUTES double definition
> bug.

Thanks! I was going to suggest similar patch, but you've beaten
me to it ;-)

> Signed-off-by: Tejun Heo <tj@...nel.org>

Acked-by: Ivan Kokshaysky <ink@...assic.park.msu.ru>

As for upcoming percpu patchset, can we similarly move the __weak attribute
to PER_CPU_DEF_ATTRIBUTES? I don't feel really comfortable with an
"extern __weak" combination - it may not work with future compilers...

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