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] [day] [month] [year] [list]
Date:	Thu, 2 Apr 2009 18:44:39 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Randy Dunlap <randy.dunlap@...cle.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andreas Herrmann <andreas.herrmann3@....com>,
	Mark Langsdorf <mark.langsdorf@....com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	x86@...nel.org
Subject: Re: [PATCH] x86: fix build error when CONFIG_K8_NB=n


* Randy Dunlap <randy.dunlap@...cle.com> wrote:

> From: Randy Dunlap <randy.dunlap@...cle.com>
> 
> Fix build error when CONFIG_K8_NB=n:
> 
> arch/x86/mm/built-in.o:(.bss+0x5c0): multiple definition of `k8_northbridges'
> arch/x86/kernel/built-in.o:(.bss+0x18c8): first defined here

Thanks for the report, this is a known bug.

> Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
> ---
>  arch/x86/include/asm/k8.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-next-20090402.orig/arch/x86/include/asm/k8.h
> +++ linux-next-20090402/arch/x86/include/asm/k8.h
> @@ -9,7 +9,7 @@ extern int early_is_k8_nb(u32 value);
>  #ifdef CONFIG_K8_NB
>  extern struct pci_dev **k8_northbridges;
>  #else
> -struct pci_dev **k8_northbridges;
> +static struct pci_dev **k8_northbridges;

This might fix the build but the change does something rather 
broken: there's now a new 'k8_northbridges' local variable array in 
each file that includes k8.h - that's wrong. We dont put static 
locals into include files that get included into several .c files, 
ever.

The real fix would be to not export k8_northbridges[] from k8.c, but 
to introduce a node_to_k8_northbridge() helper that returns a struct 
pci_dev. In the !CONFIG_K8_NB case this would be an inlne in k8.h 
that always returns NULL.

Anyway - just today i mailed about this this topic to Mark and 
Andreas about this build breakage (i have triggered it too), so 
there should be a resolution soon, either in form of a fix or in 
form of a revert.

Thanks,

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