diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:27:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:05 -0400 |
commit | fab95c55e3b94e219044dc7a558632d08c198771 (patch) | |
tree | 2ce8bf6eb52e66ee69a0b03cf9ad60310279524e /arch/um/kernel | |
parent | 0a7675aa204ac2470bb06f562557978b03914a71 (diff) |
uml: get rid of do_longjmp
do_longjmp used to be needed when UML didn't have its own implementation of
setjmp and longjmp. They came from libc, and couldn't be called directly from
kernel code, as the libc jmp_buf couldn't be imported there. do_longjmp was a
userspace function which served to provide longjmp access to kernel code.
This is gone, and a number of void * pointers can now be jmp_buf *.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/exec.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/trap.c | 6 | ||||
-rw-r--r-- | arch/um/kernel/uaccess.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 0d260567fd15..25c502617553 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -75,7 +75,7 @@ long um_execve(char *file, char __user *__user *argv, char __user *__user *env) | |||
75 | 75 | ||
76 | err = execve1(file, argv, env); | 76 | err = execve1(file, argv, env); |
77 | if (!err) | 77 | if (!err) |
78 | do_longjmp(current->thread.exec_buf, 1); | 78 | UML_LONGJMP(current->thread.exec_buf, 1); |
79 | return err; | 79 | return err; |
80 | } | 80 | } |
81 | 81 | ||
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index d2b11f242698..8456397f5f4d 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include "as-layout.h" | 17 | #include "as-layout.h" |
18 | #include "kern.h" | 18 | #include "kern.h" |
19 | #include "mem_user.h" | 19 | #include "mem_user.h" |
20 | #include "uml_uaccess.h" | 20 | #include "um_uaccess.h" |
21 | #include "os.h" | 21 | #include "os.h" |
22 | #include "linux/types.h" | 22 | #include "linux/types.h" |
23 | #include "linux/string.h" | 23 | #include "linux/string.h" |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index eac63fb6183c..bd060551e619 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -149,7 +149,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, | |||
149 | struct uml_pt_regs *regs) | 149 | struct uml_pt_regs *regs) |
150 | { | 150 | { |
151 | struct siginfo si; | 151 | struct siginfo si; |
152 | void *catcher; | 152 | jmp_buf *catcher; |
153 | int err; | 153 | int err; |
154 | int is_write = FAULT_WRITE(fi); | 154 | int is_write = FAULT_WRITE(fi); |
155 | unsigned long address = FAULT_ADDRESS(fi); | 155 | unsigned long address = FAULT_ADDRESS(fi); |
@@ -181,7 +181,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, | |||
181 | return 0; | 181 | return 0; |
182 | else if (catcher != NULL) { | 182 | else if (catcher != NULL) { |
183 | current->thread.fault_addr = (void *) address; | 183 | current->thread.fault_addr = (void *) address; |
184 | do_longjmp(catcher, 1); | 184 | UML_LONGJMP(catcher, 1); |
185 | } | 185 | } |
186 | else if (current->thread.fault_addr != NULL) | 186 | else if (current->thread.fault_addr != NULL) |
187 | panic("fault_addr set but no fault catcher"); | 187 | panic("fault_addr set but no fault catcher"); |
@@ -233,7 +233,7 @@ void relay_signal(int sig, struct uml_pt_regs *regs) | |||
233 | static void bus_handler(int sig, struct uml_pt_regs *regs) | 233 | static void bus_handler(int sig, struct uml_pt_regs *regs) |
234 | { | 234 | { |
235 | if (current->thread.fault_catcher != NULL) | 235 | if (current->thread.fault_catcher != NULL) |
236 | do_longjmp(current->thread.fault_catcher, 1); | 236 | UML_LONGJMP(current->thread.fault_catcher, 1); |
237 | else relay_signal(sig, regs); | 237 | else relay_signal(sig, regs); |
238 | } | 238 | } |
239 | 239 | ||
diff --git a/arch/um/kernel/uaccess.c b/arch/um/kernel/uaccess.c index 054e3de0784e..d7436aacd26f 100644 --- a/arch/um/kernel/uaccess.c +++ b/arch/um/kernel/uaccess.c | |||
@@ -18,7 +18,7 @@ void __do_copy(void *to, const void *from, int n) | |||
18 | 18 | ||
19 | 19 | ||
20 | int __do_copy_to_user(void *to, const void *from, int n, | 20 | int __do_copy_to_user(void *to, const void *from, int n, |
21 | void **fault_addr, void **fault_catcher) | 21 | void **fault_addr, jmp_buf **fault_catcher) |
22 | { | 22 | { |
23 | unsigned long fault; | 23 | unsigned long fault; |
24 | int faulted; | 24 | int faulted; |