aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-02-13 07:26:26 -0500
committerAndi Kleen <andi@basil.nowhere.org>2007-02-13 07:26:26 -0500
commit9fbbd4dd17d0712054368e5e939e28b2456bfe1b (patch)
tree778766e35c52529ed0fc369ce1c3cf9382fc6e16 /arch/x86_64
parent120fad72401ebec2a126c16cc48f56c28f3eefe2 (diff)
[PATCH] x86: Don't require the vDSO for handling a.out signals
and in other strange binfmts. vDSO is not necessarily mapped there. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/ia32/ia32_signal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c
index 490f7c1b7c84..359eacc38509 100644
--- a/arch/x86_64/ia32/ia32_signal.c
+++ b/arch/x86_64/ia32/ia32_signal.c
@@ -21,6 +21,7 @@
21#include <linux/stddef.h> 21#include <linux/stddef.h>
22#include <linux/personality.h> 22#include <linux/personality.h>
23#include <linux/compat.h> 23#include <linux/compat.h>
24#include <linux/binfmts.h>
24#include <asm/ucontext.h> 25#include <asm/ucontext.h>
25#include <asm/uaccess.h> 26#include <asm/uaccess.h>
26#include <asm/i387.h> 27#include <asm/i387.h>
@@ -449,7 +450,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
449 450
450 /* Return stub is in 32bit vsyscall page */ 451 /* Return stub is in 32bit vsyscall page */
451 { 452 {
452 void __user *restorer = VSYSCALL32_SIGRETURN; 453 void __user *restorer;
454 if (current->binfmt->hasvdso)
455 restorer = VSYSCALL32_SIGRETURN;
456 else
457 restorer = (void *)&frame->retcode;
453 if (ka->sa.sa_flags & SA_RESTORER) 458 if (ka->sa.sa_flags & SA_RESTORER)
454 restorer = ka->sa.sa_restorer; 459 restorer = ka->sa.sa_restorer;
455 err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); 460 err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);