diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/um/sys-x86_64/fault.c | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'arch/um/sys-x86_64/fault.c')
| -rw-r--r-- | arch/um/sys-x86_64/fault.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/um/sys-x86_64/fault.c b/arch/um/sys-x86_64/fault.c new file mode 100644 index 00000000000..ce85117fc64 --- /dev/null +++ b/arch/um/sys-x86_64/fault.c | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2003 PathScale, Inc. | ||
| 3 | * | ||
| 4 | * Licensed under the GPL | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include "sysdep/ptrace.h" | ||
| 8 | |||
| 9 | /* These two are from asm-um/uaccess.h and linux/module.h, check them. */ | ||
| 10 | struct exception_table_entry | ||
| 11 | { | ||
| 12 | unsigned long insn; | ||
| 13 | unsigned long fixup; | ||
| 14 | }; | ||
| 15 | |||
| 16 | const struct exception_table_entry *search_exception_tables(unsigned long add); | ||
| 17 | |||
| 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 | } | ||
