uml: don't allow processes to call into stub
[powerpc.git] / arch / um / os-Linux / skas / trap.c
index e53face..a19a74f 100644 (file)
@@ -3,22 +3,26 @@
  * Licensed under the GPL
  */
 
-#if 0
-#include "kern_util.h"
-#include "skas.h"
-#include "ptrace_user.h"
-#include "sysdep/ptrace_user.h"
-#endif
-
 #include <errno.h>
 #include <signal.h>
 #include "sysdep/ptrace.h"
 #include "kern_constants.h"
 #include "as-layout.h"
+#include "kern_util.h"
 #include "os.h"
 #include "sigcontext.h"
 #include "task.h"
 
+void (*sig_info[NSIG])(int, struct uml_pt_regs *) = {
+       [SIGTRAP]       = relay_signal,
+       [SIGFPE]        = relay_signal,
+       [SIGILL]        = relay_signal,
+       [SIGWINCH]      = winch,
+       [SIGBUS]        = bus_handler,
+       [SIGSEGV]       = segv_handler,
+       [SIGIO]         = sigio_handler,
+       [SIGVTALRM]     = timer_handler };
+
 static struct uml_pt_regs ksig_regs[UM_NR_CPUS];
 
 void sig_handler_common_skas(int sig, void *sc_ptr)
@@ -58,9 +62,8 @@ void sig_handler_common_skas(int sig, void *sc_ptr)
 
        handler = sig_info[sig];
 
-       /* unblock SIGALRM, SIGVTALRM, SIGIO if sig isn't IRQ signal */
-       if (sig != SIGIO && sig != SIGWINCH &&
-           sig != SIGVTALRM && sig != SIGALRM)
+       /* unblock SIGVTALRM, SIGIO if sig isn't IRQ signal */
+       if ((sig != SIGIO) && (sig != SIGWINCH) && (sig != SIGVTALRM))
                unblock_signals();
 
        handler(sig, r);