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]
Message-ID: <alpine.DEB.1.10.0810292139170.6145@gandalf.stny.rr.com>
Date:	Wed, 29 Oct 2008 21:43:19 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	LKML <linux-kernel@...r.kernel.org>
cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>
Subject: [PATCH][RFC] x86: add non x86 build configuration


A lot of developers develop on x86 architectures, and do things that
sometimes breaks non x86 archs. This patch adds a debug option to
turn off all the CONFIG_HAVE_ options that x86 sets. This allows
developers to easily test their code to make sure that it compiles
without a lot of the assumptions that x86 makes.

Note: Recently the ftrace code had an issue where a depend was set
  by the wrong select, but that select was not set by all archs.
  This patch catches that issue when compiling on x86.

Signed-off-by: Steven Rostedt <srostedt@...hat.com>
---
 arch/x86/Kconfig |   27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

Index: linux-tip.git/arch/x86/Kconfig
===================================================================
--- linux-tip.git.orig/arch/x86/Kconfig	2008-10-29 20:49:11.000000000 -0400
+++ linux-tip.git/arch/x86/Kconfig	2008-10-29 21:28:52.000000000 -0400
@@ -18,11 +18,20 @@ config X86_64
 ### Arch settings
 config X86
 	def_bool y
+	# configs needed by arch/x86 code
+	select HAVE_IOREMAP_PROT
+
+# make a choice to keep allyesconfig from choosing non x86
+choice
+	prompt "Configuration Model"
+	default NORMAL_X86_CONFIGURATION
+
+config NORMAL_X86_CONFIGURATION
+	prompt "Normal Configuration Model"
 	select HAVE_AOUT if X86_32
 	select HAVE_UNSTABLE_SCHED_CLOCK
 	select HAVE_IDE
 	select HAVE_OPROFILE
-	select HAVE_IOREMAP_PROT
 	select HAVE_KPROBES
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select HAVE_KRETPROBES
@@ -35,6 +44,22 @@ config X86
 	select HAVE_GENERIC_DMA_COHERENT if X86_32
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS
 
+config SIMULATE_NON_X86_CONFIGURATION
+	bool "Simulate non x86 configuration"
+	depends on DEBUG_KERNEL
+	help
+	  Several developers just test on a x86 architecture, and sometimes
+	  break non x86 architectures without realizing it. This config
+	  option disables a lot of configurations that are set by
+	  being x86. Any development should compile an allyesconfig
+	  with this setting enabled.
+
+	  Note, the kernel should compile, there's no guarantee that it
+	  will boot.
+
+	  If unsure, select "Normal Operation Model"
+endchoice
+
 config ARCH_DEFCONFIG
 	string
 	default "arch/x86/configs/i386_defconfig" if X86_32


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