aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-01-11 03:16:07 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 03:16:07 -0800
commitf89675402f9df8ef646fa836aa67439b448016c7 (patch)
tree760dc937803f0962656a9078ac3d2f2ca7dc040f /arch
parent6ffc5f005a13511e0f4e5012dccf1bf9b48b0cfc (diff)
downloadhistory-f89675402f9df8ef646fa836aa67439b448016c7.tar.gz
[PATCH] UML: Allow arches to opt out of !SA_INFO signals
x86_64 only delivers signals in the SA_INFO style, whether you ask for it or not. This patch adds a config option which says whether the arch is SA_INFO-only or not, and ifdefs out the sigcontext signal delivery if so. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/Kconfig_i3864
-rw-r--r--arch/um/Kconfig_x86_644
-rw-r--r--arch/um/kernel/signal_kern.c8
3 files changed, 13 insertions, 3 deletions
diff --git a/arch/um/Kconfig_i386 b/arch/um/Kconfig_i386
index 2f5f053bc46195..e3d956db3daad5 100644
--- a/arch/um/Kconfig_i386
+++ b/arch/um/Kconfig_i386
@@ -14,3 +14,7 @@ config 3_LEVEL_PGTABLES
Three-level pagetables will let UML have more than 4G of physical
memory. All the memory that can't be mapped directly will be treated
as high memory.
+
+config ARCH_HAS_SC_SIGNALS
+ bool
+ default y
diff --git a/arch/um/Kconfig_x86_64 b/arch/um/Kconfig_x86_64
index d61c852ed41f20..0d3d05cab5b7d7 100644
--- a/arch/um/Kconfig_x86_64
+++ b/arch/um/Kconfig_x86_64
@@ -5,3 +5,7 @@ config 64_BIT
config 3_LEVEL_PGTABLES
bool
default y
+
+config ARCH_HAS_SC_SIGNALS
+ bool
+ default n
diff --git a/arch/um/kernel/signal_kern.c b/arch/um/kernel/signal_kern.c
index 5e432b16f8ec42..44c05e5690b837 100644
--- a/arch/um/kernel/signal_kern.c
+++ b/arch/um/kernel/signal_kern.c
@@ -74,10 +74,12 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
sp = current->sas_ss_sp + current->sas_ss_size;
- if(ka->sa.sa_flags & SA_SIGINFO)
- err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
- else
+#ifdef CONFIG_ARCH_HAS_SC_SIGNALS
+ if(!(ka->sa.sa_flags & SA_SIGINFO))
err = setup_signal_stack_sc(sp, signr, ka, regs, oldset);
+ else
+#endif
+ err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
if(err){
spin_lock_irq(&current->sighand->siglock);