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:	Sun, 25 May 2008 08:22:10 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Roman Zippel <zippel@...ux-m68k.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [PATCH] x86: use defconfig as last resort

> 
> Wouldn't this be cleaner as just *one* entry, and then just have 
> different default statements, ie something like
> 
>     config DEFCONFIG_LIST
> 	string
> 	option defconfig_list
> 	default "arch/x86/configs/i386_defconfig" if X86_32
> 	default "arch/x86/configs/x86_64_defconfig" if X86_64
> 
> instead?

Following patch moves the stuff away from the arch
specific Kconfig file and works at least for
x86 and alpha.
It uses the already defined environment variables to locate
the defconfig and try known locations.

	Sam

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fe361ae..6a4b98e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -26,19 +26,6 @@ config X86
 	select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
 	select HAVE_ARCH_KGDB if !X86_VOYAGER
 
-config DEFCONFIG_LIST
-	string
-	depends on X86_32
-	option defconfig_list
-	default "arch/x86/configs/i386_defconfig"
-
-config DEFCONFIG_LIST
-	string
-	depends on X86_64
-	option defconfig_list
-	default "arch/x86/configs/x86_64_defconfig"
-
-
 config GENERIC_LOCKBREAK
 	def_bool n
 
diff --git a/init/Kconfig b/init/Kconfig
index 6135d07..2aa7180 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -6,6 +6,14 @@ config KERNELVERSION
 	string
 	option env="KERNELVERSION"
 
+config KBUILD_DEFCONFIG
+	string
+	option env="KBUILD_DEFCONFIG"
+
+config SRCARCH
+	string
+	option env="SRCARCH"
+
 config DEFCONFIG_LIST
 	string
 	depends on !UML
@@ -13,7 +21,8 @@ config DEFCONFIG_LIST
 	default "/lib/modules/$UNAME_RELEASE/.config"
 	default "/etc/kernel-config"
 	default "/boot/config-$UNAME_RELEASE"
-	default "arch/$ARCH/defconfig"
+	default "arch/$SRCARCH/configs/$KBUILD_DEFCONFIG"
+	default "arch/$SRCARCH/defconfig"
 
 menu "General setup"
 
--
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