Commit f8967540 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[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: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6ffc5f00
...@@ -14,3 +14,7 @@ config 3_LEVEL_PGTABLES ...@@ -14,3 +14,7 @@ config 3_LEVEL_PGTABLES
Three-level pagetables will let UML have more than 4G of physical 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 memory. All the memory that can't be mapped directly will be treated
as high memory. as high memory.
config ARCH_HAS_SC_SIGNALS
bool
default y
...@@ -5,3 +5,7 @@ config 64_BIT ...@@ -5,3 +5,7 @@ config 64_BIT
config 3_LEVEL_PGTABLES config 3_LEVEL_PGTABLES
bool bool
default y default y
config ARCH_HAS_SC_SIGNALS
bool
default n
...@@ -74,10 +74,12 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, ...@@ -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)) if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
sp = current->sas_ss_sp + current->sas_ss_size; sp = current->sas_ss_sp + current->sas_ss_size;
if(ka->sa.sa_flags & SA_SIGINFO) #ifdef CONFIG_ARCH_HAS_SC_SIGNALS
err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); if(!(ka->sa.sa_flags & SA_SIGINFO))
else
err = setup_signal_stack_sc(sp, signr, ka, regs, oldset); 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){ if(err){
spin_lock_irq(&current->sighand->siglock); spin_lock_irq(&current->sighand->siglock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment