diff options
Diffstat (limited to 'arch/um/os-Linux/skas/process.c')
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index dee0e8cf8ad0..cd65727854eb 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -9,31 +9,23 @@ | |||
9 | #include <errno.h> | 9 | #include <errno.h> |
10 | #include <string.h> | 10 | #include <string.h> |
11 | #include <sys/mman.h> | 11 | #include <sys/mman.h> |
12 | #include <sys/ptrace.h> | ||
13 | #include <sys/wait.h> | 12 | #include <sys/wait.h> |
14 | #include <asm/unistd.h> | 13 | #include <asm/unistd.h> |
15 | #include "as-layout.h" | 14 | #include "as-layout.h" |
16 | #include "chan_user.h" | 15 | #include "init.h" |
17 | #include "kern_constants.h" | ||
18 | #include "kern_util.h" | 16 | #include "kern_util.h" |
19 | #include "mem.h" | 17 | #include "mem.h" |
20 | #include "os.h" | 18 | #include "os.h" |
21 | #include "process.h" | ||
22 | #include "proc_mm.h" | 19 | #include "proc_mm.h" |
23 | #include "ptrace_user.h" | 20 | #include "ptrace_user.h" |
24 | #include "registers.h" | 21 | #include "registers.h" |
25 | #include "skas.h" | 22 | #include "skas.h" |
26 | #include "skas_ptrace.h" | 23 | #include "skas_ptrace.h" |
27 | #include "user.h" | ||
28 | #include "sysdep/stub.h" | 24 | #include "sysdep/stub.h" |
29 | 25 | ||
30 | int is_skas_winch(int pid, int fd, void *data) | 26 | int is_skas_winch(int pid, int fd, void *data) |
31 | { | 27 | { |
32 | if (pid != getpgrp()) | 28 | return pid == getpgrp(); |
33 | return 0; | ||
34 | |||
35 | register_winch_irq(-1, fd, -1, data, 0); | ||
36 | return 1; | ||
37 | } | 29 | } |
38 | 30 | ||
39 | static int ptrace_dump_regs(int pid) | 31 | static int ptrace_dump_regs(int pid) |
@@ -169,7 +161,7 @@ static void handle_trap(int pid, struct uml_pt_regs *regs, | |||
169 | 161 | ||
170 | if (!local_using_sysemu) | 162 | if (!local_using_sysemu) |
171 | { | 163 | { |
172 | err = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET, | 164 | err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, |
173 | __NR_getpid); | 165 | __NR_getpid); |
174 | if (err < 0) { | 166 | if (err < 0) { |
175 | printk(UM_KERN_ERR "handle_trap - nullifying syscall " | 167 | printk(UM_KERN_ERR "handle_trap - nullifying syscall " |
@@ -257,8 +249,8 @@ static int userspace_tramp(void *stack) | |||
257 | 249 | ||
258 | set_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE); | 250 | set_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE); |
259 | sigemptyset(&sa.sa_mask); | 251 | sigemptyset(&sa.sa_mask); |
260 | sa.sa_flags = SA_ONSTACK | SA_NODEFER; | 252 | sa.sa_flags = SA_ONSTACK | SA_NODEFER | SA_SIGINFO; |
261 | sa.sa_handler = (void *) v; | 253 | sa.sa_sigaction = (void *) v; |
262 | sa.sa_restorer = NULL; | 254 | sa.sa_restorer = NULL; |
263 | if (sigaction(SIGSEGV, &sa, NULL) < 0) { | 255 | if (sigaction(SIGSEGV, &sa, NULL) < 0) { |
264 | printk(UM_KERN_ERR "userspace_tramp - setting SIGSEGV " | 256 | printk(UM_KERN_ERR "userspace_tramp - setting SIGSEGV " |
@@ -661,8 +653,7 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf) | |||
661 | { | 653 | { |
662 | int n; | 654 | int n; |
663 | 655 | ||
664 | set_handler(SIGWINCH, (__sighandler_t) sig_handler, | 656 | set_handler(SIGWINCH); |
665 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGVTALRM, -1); | ||
666 | 657 | ||
667 | /* | 658 | /* |
668 | * Can't use UML_SETJMP or UML_LONGJMP here because they save | 659 | * Can't use UML_SETJMP or UML_LONGJMP here because they save |