
From: Andy Whitcroft <apw@shadowen.org>

There seems to be code recently added to -bk and thereby -mm which supports
extra debug for preempt on system call exit.  Oddly there doesn't seem to
be configuration options to enable them.  Below is a possible patch to
allow enabling this on i386.  Sadly the most obvious menu to add this to is
the Kernel Hacking menu, but that is defined in architecture specific
configuration.  If this makes sense I could patch the other arches?

Add a configuration option to allow enabling TRAP_BAD_SYSCALL_EXITS to the
Kernel Hacking menu.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/Kconfig |    7 +++++++
 1 files changed, 7 insertions(+)

diff -puN arch/i386/Kconfig~add-trap_bad_syscall_exits-config-for-i386 arch/i386/Kconfig
--- 25/arch/i386/Kconfig~add-trap_bad_syscall_exits-config-for-i386	Fri Jul  2 16:32:02 2004
+++ 25-akpm/arch/i386/Kconfig	Fri Jul  2 16:32:02 2004
@@ -1483,6 +1483,13 @@ config X86_MPPARSE
 	depends on X86_LOCAL_APIC && !X86_VISWS
 	default y
 
+config TRAP_BAD_SYSCALL_EXITS
+	bool "Debug bad system call exits"
+	help
+	  If you say Y here the kernel will check for system calls which
+	  return without clearing preempt.
+        default n
+
 endmenu
 
 source "security/Kconfig"
_
