1 arch/um/kernel/process.c | 2 +-
2 arch/um/kernel/skas/process.c | 26 +++++++++++++-------------
3 arch/um/kernel/skas/syscall_kern.c | 3 ++-
4 arch/um/kernel/trap_user.c | 2 +-
5 arch/um/kernel/tt/syscall_kern.c | 3 ++-
6 arch/um/kernel/tt/uaccess_user.c | 2 +-
7 arch/um/kernel/uaccess_user.c | 2 +-
8 arch/um/link.ld.in | 1 -
9 8 files changed, 21 insertions(+), 20 deletions(-)
11 Index: linux-2.4.20/arch/um/link.ld.in
12 ===================================================================
13 --- linux-2.4.20.orig/arch/um/link.ld.in 2003-10-25 00:35:59.000000000 +0400
14 +++ linux-2.4.20/arch/um/link.ld.in 2003-10-25 00:36:02.000000000 +0400
17 . = START() + SIZEOF_HEADERS;
23 Index: linux-2.4.20/arch/um/kernel/process.c
24 ===================================================================
25 --- linux-2.4.20.orig/arch/um/kernel/process.c 2003-10-25 00:35:59.000000000 +0400
26 +++ linux-2.4.20/arch/um/kernel/process.c 2003-10-25 00:36:02.000000000 +0400
32 + n = sigsetjmp(buf, 1);
36 Index: linux-2.4.20/arch/um/kernel/skas/process.c
37 ===================================================================
38 --- linux-2.4.20.orig/arch/um/kernel/skas/process.c 2003-10-25 00:35:59.000000000 +0400
39 +++ linux-2.4.20/arch/um/kernel/skas/process.c 2003-10-25 00:36:02.000000000 +0400
41 int err, syscall_nr, status;
43 syscall_nr = PT_SYSCALL_NR(regs->skas.regs);
44 + UPT_SYSCALL_NR(regs) = syscall_nr;
46 relay_signal(SIGTRAP, regs);
49 - UPT_SYSCALL_NR(regs) = syscall_nr;
51 err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid);
54 *switch_buf_ptr = &switch_buf;
55 *fork_buf_ptr = &fork_buf;
57 - if(setjmp(fork_buf) == 0)
58 + if(sigsetjmp(fork_buf, 1) == 0)
59 new_thread_proc(stack, handler);
66 - if(setjmp(buf) == 0)
67 - longjmp(*fork_buf, 1);
68 + if(sigsetjmp(buf, 1) == 0)
69 + siglongjmp(*fork_buf, 1);
72 static int move_registers(int int_op, int fp_op, union uml_pt_regs *regs,
74 jmp_buf my_buf, **me_ptr = me, *next_buf = next;
77 - if(setjmp(my_buf) == 0)
78 - longjmp(*next_buf, 1);
79 + if(sigsetjmp(my_buf, 1) == 0)
80 + siglongjmp(*next_buf, 1);
83 static jmp_buf initial_jmpbuf;
87 *fork_buf_ptr = &initial_jmpbuf;
88 - n = setjmp(initial_jmpbuf);
89 + n = sigsetjmp(initial_jmpbuf, 1);
91 new_thread_proc((void *) stack, new_thread_handler);
96 - longjmp(*cb_back, 1);
97 + siglongjmp(*cb_back, 1);
105 - longjmp(**switch_buf, 1);
106 + siglongjmp(**switch_buf, 1);
109 void remove_sigstack(void)
114 - if(setjmp(here) == 0)
115 - longjmp(initial_jmpbuf, 2);
116 + if(sigsetjmp(here, 1) == 0)
117 + siglongjmp(initial_jmpbuf, 2);
121 @@ -328,13 +328,13 @@
125 - longjmp(initial_jmpbuf, 3);
126 + siglongjmp(initial_jmpbuf, 3);
129 void reboot_skas(void)
132 - longjmp(initial_jmpbuf, 4);
133 + siglongjmp(initial_jmpbuf, 4);
137 Index: linux-2.4.20/arch/um/kernel/skas/syscall_kern.c
138 ===================================================================
139 --- linux-2.4.20.orig/arch/um/kernel/skas/syscall_kern.c 2003-10-25 00:35:59.000000000 +0400
140 +++ linux-2.4.20/arch/um/kernel/skas/syscall_kern.c 2003-10-25 00:36:02.000000000 +0400
143 syscall = UPT_SYSCALL_NR(®s->regs);
145 - if((syscall >= NR_syscalls) || (syscall < 0))
146 + if((syscall >= NR_syscalls) || (syscall < 0) ||
147 + (sys_call_table[syscall] == NULL))
149 else res = EXECUTE_SYSCALL(syscall, regs);
151 Index: linux-2.4.20/arch/um/kernel/trap_user.c
152 ===================================================================
153 --- linux-2.4.20.orig/arch/um/kernel/trap_user.c 2003-10-25 00:35:59.000000000 +0400
154 +++ linux-2.4.20/arch/um/kernel/trap_user.c 2003-10-25 00:36:02.000000000 +0400
159 - longjmp(*buf, val);
160 + siglongjmp(*buf, val);
164 Index: linux-2.4.20/arch/um/kernel/tt/syscall_kern.c
165 ===================================================================
166 --- linux-2.4.20.orig/arch/um/kernel/tt/syscall_kern.c 2003-10-25 00:35:59.000000000 +0400
167 +++ linux-2.4.20/arch/um/kernel/tt/syscall_kern.c 2003-10-25 00:36:02.000000000 +0400
170 syscall = UPT_SYSCALL_NR(®s->regs);
172 - if((syscall >= NR_syscalls) || (syscall < 0))
173 + if((syscall >= NR_syscalls) || (syscall < 0) ||
174 + (sys_call_table[syscall] == NULL))
176 else if(honeypot && check_bogosity(regs))
178 Index: linux-2.4.20/arch/um/kernel/tt/uaccess_user.c
179 ===================================================================
180 --- linux-2.4.20.orig/arch/um/kernel/tt/uaccess_user.c 2003-10-25 00:35:59.000000000 +0400
181 +++ linux-2.4.20/arch/um/kernel/tt/uaccess_user.c 2003-10-25 00:36:02.000000000 +0400
185 *fault_catcher = &jbuf;
186 - if(setjmp(jbuf) == 0){
187 + if(sigsetjmp(jbuf, 1) == 0){
188 ret = strlen(str) + 1;
191 Index: linux-2.4.20/arch/um/kernel/uaccess_user.c
192 ===================================================================
193 --- linux-2.4.20.orig/arch/um/kernel/uaccess_user.c 2003-10-25 00:35:59.000000000 +0400
194 +++ linux-2.4.20/arch/um/kernel/uaccess_user.c 2003-10-25 00:36:02.000000000 +0400
198 *fault_catcher = &jbuf;
199 - if(setjmp(jbuf) == 0){
200 + if(sigsetjmp(jbuf, 1) == 0){
204 Index: linux-2.4.20/arch/um/kernel/tt/ptproxy/sysdep.c
205 ===================================================================
206 --- linux-2.4.20.orig/arch/um/kernel/tt/ptproxy/sysdep.c 2003-10-25 00:35:59.000000000 +0400
207 +++ linux-2.4.20/arch/um/kernel/tt/ptproxy/sysdep.c 2003-10-25 00:36:23.000000000 +0400
213 #include <sys/types.h>
214 #include <sys/ptrace.h>
215 #include <asm/ptrace.h>