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-next>] [day] [month] [year] [list]
Message-Id: <200810270817.m9R8HsJu029399@harpo.it.uu.se>
Date:	Mon, 27 Oct 2008 09:17:54 +0100 (MET)
From:	Mikael Pettersson <mikpe@...uu.se>
To:	mingo@...hat.com
Cc:	hpa@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [PATCH 2.6.28-rc2] i386: fix forbid_dac linkage error when CONFIG_PCI=n

Fix 2.6.28-rc2 build failure on i386 with CONFIG_PCI=n:

  ld -m elf_i386  -o .tmp_vmlinux1 -T arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_32.o arch/x86/kernel/head32.o arch/x86/kernel/head.o arch/x86/kernel/init_task.o  init/built-in.o --start-group  usr/built-in.o  arch/x86/kernel/built-in.o  arch/x86/mm/built-in.o  arch/x86/mach-default/built-in.o  arch/x86/crypto/built-in.o  arch/x86/vdso/built-in.o  kernel/built-in.o  mm/built-in.o  fs/built-in.o  ipc/built-in.o  security/built-in.o  crypto/built-in.o  block/built-in.o  lib/lib.a  arch/x86/lib/lib.a  lib/built-in.o  arch/x86/lib/built-in.o  drivers/built-in.o  sound/built-in.o  firmware/built-in.o  net/built-in.o --end-group 
arch/x86/kernel/built-in.o: In function `iommu_setup':
pci-dma.c:(.init.text+0x3120): undefined reference to `forbid_dac'
pci-dma.c:(.init.text+0x313f): undefined reference to `forbid_dac'
pci-dma.c:(.init.text+0x3187): undefined reference to `forbid_dac'
make: *** [.tmp_vmlinux1] Error 1

The variable forbid_dac was moved from arch/x86/kernel/pci-dma.c
to drivers/pci/quirks.c. When CONFIG_PCI=n pci-dma.c now refers to
a variable that's never defined, causing a linkage error.

Fixed by bracketing the forbid_dac accesses (command-line options
parsing) with #ifdef CONFIG_PCI ... #endif.

Signed-off-by: Mikael Pettersson <mikpe@...uu.se>
---
 arch/x86/kernel/pci-dma.c |    2 ++
 1 file changed, 2 insertions(+)

diff -rupN linux-2.6.28-rc2/arch/x86/kernel/pci-dma.c linux-2.6.28-rc2.x86-forbid_dac-is-pci-only/arch/x86/kernel/pci-dma.c
--- linux-2.6.28-rc2/arch/x86/kernel/pci-dma.c	2008-10-26 21:35:33.000000000 +0100
+++ linux-2.6.28-rc2.x86-forbid_dac-is-pci-only/arch/x86/kernel/pci-dma.c	2008-10-27 08:55:10.000000000 +0100
@@ -202,6 +202,7 @@ static __init int iommu_setup(char *p)
 			iommu_merge = 0;
 		if (!strncmp(p, "forcesac", 8))
 			iommu_sac_force = 1;
+#ifdef CONFIG_PCI
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
 		if (!strncmp(p, "nodac", 5))
@@ -210,6 +211,7 @@ static __init int iommu_setup(char *p)
 			forbid_dac = -1;
 			return 1;
 		}
+#endif /* CONFIG_PCI */
 #ifdef CONFIG_SWIOTLB
 		if (!strncmp(p, "soft", 4))
 			swiotlb = 1;
--
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