]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/x86/um/fault.c
Merge tag 'kvm-arm-for-3.18-take-2' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / um / fault.c
CommitLineData
1da177e4 1/*
ba180fd4 2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
1da177e4
LT
3 * Licensed under the GPL
4 */
5
37185b33 6#include <sysdep/ptrace.h>
1da177e4
LT
7
8/* These two are from asm-um/uaccess.h and linux/module.h, check them. */
9struct exception_table_entry
10{
11 unsigned long insn;
12 unsigned long fixup;
13};
14
15const struct exception_table_entry *search_exception_tables(unsigned long add);
16
17/* Compare this to arch/i386/mm/extable.c:fixup_exception() */
77bf4400 18int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
1da177e4 19{
1da177e4
LT
20 const struct exception_table_entry *fixup;
21
22 fixup = search_exception_tables(address);
7be0b065 23 if (fixup) {
5d86456d 24 UPT_IP(regs) = fixup->fixup;
ba180fd4 25 return 1;
1da177e4 26 }
ba180fd4 27 return 0;
1da177e4 28}