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, 03 Feb 2012 14:29:41 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Cong Wang <xiyou.wangcong@...il.com>
CC:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	David Daney <david.daney@...ium.com>,
	Hillf Danton <dhillf@...il.com>, linux-mips@...ux-mips.org
Subject: Re: [Patch] mips: do not redefine BUILD_BUG()

Hello.

On 03-02-2012 11:51, Cong Wang wrote:

> On mips, we got

> include/linux/kernel.h:717:1: error: "BUILD_BUG" redefined
> arch/mips/include/asm/page.h:43:1: error: this is the location of the previous definition
> make[3]: *** [arch/mips/sgi-ip27/ip27-console.o] Error 1
> make[2]: *** [arch/mips/sgi-ip27] Error 2
> make[1]: *** [arch/mips] Error 2
> make: *** [sub-make] Error 2

> use generic BUILD_BUG() instead of re-defining one.

> Signed-off-by: WANG Cong<xiyou.wangcong@...il.com>

> ---
> diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
> index d417909..e14121a 100644
> --- a/arch/mips/include/asm/page.h
> +++ b/arch/mips/include/asm/page.h
> @@ -39,9 +39,7 @@
>   #define HPAGE_MASK	(~(HPAGE_SIZE - 1))
>   #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
>   #else /* !CONFIG_HUGETLB_PAGE */
> -# ifndef BUILD_BUG

    Not clear why we get the error if we're protected with #ifndef...

> -#  define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0)
> -# endif
> +#include<linux/kernel.h>

    Do not do #include among the #define's...

>   #define HPAGE_SHIFT	({BUILD_BUG(); 0; })
>   #define HPAGE_SIZE	({BUILD_BUG(); 0; })
>   #define HPAGE_MASK	({BUILD_BUG(); 0; })

WBR, Sergei
--
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