diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:51:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:02 -0400 |
commit | 5d86456d3852cb95a38d2b23fe01cede54984ba5 (patch) | |
tree | a0e973d629717d93c7b4dc32ad7afd9e64f5f974 /arch/um/sys-x86_64 | |
parent | ccdddb57874522e6b267204f9c5e94ba7d9d66b0 (diff) |
uml: tidy fault code
Tidying in preparation for the segfault register dumping patch which follows.
void * pointers are changed to union uml_pt_regs *. This makes the types
match reality, except in arch_fixup, which is changed to operate on a union
uml_pt_regs. This fixes a bug in the call from segv_handler, which passes a
union uml_pt_regs, to segv, which expects to pass a struct sigcontext to
arch_fixup.
Whitespace and other style fixes.
There's also a errno printk fix.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r-- | arch/um/sys-x86_64/fault.c | 30 | ||||
-rw-r--r-- | arch/um/sys-x86_64/signal.c | 2 |
2 files changed, 18 insertions, 14 deletions
diff --git a/arch/um/sys-x86_64/fault.c b/arch/um/sys-x86_64/fault.c index cee1513c5c31..4636b1465b6c 100644 --- a/arch/um/sys-x86_64/fault.c +++ b/arch/um/sys-x86_64/fault.c | |||
@@ -4,20 +4,24 @@ | |||
4 | * Licensed under the GPL | 4 | * Licensed under the GPL |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include "user.h" | 7 | #include "sysdep/ptrace.h" |
8 | 8 | ||
9 | int arch_fixup(unsigned long address, void *sc_ptr) | 9 | /* These two are from asm-um/uaccess.h and linux/module.h, check them. */ |
10 | struct exception_table_entry | ||
10 | { | 11 | { |
11 | /* XXX search_exception_tables() */ | 12 | unsigned long insn; |
13 | unsigned long fixup; | ||
14 | }; | ||
15 | |||
16 | const struct exception_table_entry *search_exception_tables(unsigned long add); | ||
17 | int arch_fixup(unsigned long address, union uml_pt_regs *regs) | ||
18 | { | ||
19 | const struct exception_table_entry *fixup; | ||
20 | |||
21 | fixup = search_exception_tables(address); | ||
22 | if(fixup != 0){ | ||
23 | UPT_IP(regs) = fixup->fixup; | ||
24 | return(1); | ||
25 | } | ||
12 | return(0); | 26 | return(0); |
13 | } | 27 | } |
14 | |||
15 | /* Overrides for Emacs so that we follow Linus's tabbing style. | ||
16 | * Emacs will notice this stuff at the end of the file and automatically | ||
17 | * adjust the settings for this buffer only. This must remain at the end | ||
18 | * of the file. | ||
19 | * --------------------------------------------------------------------------- | ||
20 | * Local variables: | ||
21 | * c-file-style: "linux" | ||
22 | * End: | ||
23 | */ | ||
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index af2f017617b4..068006213598 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -51,7 +51,7 @@ static int copy_sc_from_user_skas(struct pt_regs *regs, | |||
51 | 51 | ||
52 | #undef GETREG | 52 | #undef GETREG |
53 | 53 | ||
54 | return(err); | 54 | return err; |
55 | } | 55 | } |
56 | 56 | ||
57 | int copy_sc_to_user_skas(struct sigcontext __user *to, | 57 | int copy_sc_to_user_skas(struct sigcontext __user *to, |