diff options
Diffstat (limited to 'arch/x86/um/fault.c')
-rw-r--r-- | arch/x86/um/fault.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/x86/um/fault.c b/arch/x86/um/fault.c new file mode 100644 index 000000000000..d670f68532f4 --- /dev/null +++ b/arch/x86/um/fault.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "sysdep/ptrace.h" | ||
7 | |||
8 | /* These two are from asm-um/uaccess.h and linux/module.h, check them. */ | ||
9 | struct exception_table_entry | ||
10 | { | ||
11 | unsigned long insn; | ||
12 | unsigned long fixup; | ||
13 | }; | ||
14 | |||
15 | const struct exception_table_entry *search_exception_tables(unsigned long add); | ||
16 | |||
17 | /* Compare this to arch/i386/mm/extable.c:fixup_exception() */ | ||
18 | int arch_fixup(unsigned long address, struct uml_pt_regs *regs) | ||
19 | { | ||
20 | const struct exception_table_entry *fixup; | ||
21 | |||
22 | fixup = search_exception_tables(address); | ||
23 | if (fixup != 0) { | ||
24 | UPT_IP(regs) = fixup->fixup; | ||
25 | return 1; | ||
26 | } | ||
27 | return 0; | ||
28 | } | ||