diff options
author | Gennady Sharapov <Gennady.V.Sharapov@intel.com> | 2006-01-08 01:01:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:13:39 -0800 |
commit | c66fdd5e324392584c6f11de65cfe24b0e2d9303 (patch) | |
tree | f05cb784406c0a0cb24d291e515dfcaa3e4b6464 /arch/um/kernel/trap_kern.c | |
parent | ea2ba7dc3dd3f85034e6da6abacc813d723a2ad5 (diff) |
[PATCH] uml: merge trap_user.c and trap_kern.c
The serial UML OS-abstraction layer patch (um/kernel dir).
This joins trap_user.c and trap_kernel.c files.
Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/trap_kern.c')
-rw-r--r-- | arch/um/kernel/trap_kern.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index b79f805bdc0..d56046c2aba 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c @@ -26,6 +26,9 @@ #include "mconsole_kern.h" #include "mem.h" #include "mem_kern.h" +#include "sysdep/sigcontext.h" +#include "sysdep/ptrace.h" +#include "os.h" #ifdef CONFIG_MODE_SKAS #include "skas.h" #endif @@ -126,6 +129,17 @@ out_of_memory: goto out; } +void segv_handler(int sig, union uml_pt_regs *regs) +{ + struct faultinfo * fi = UPT_FAULTINFO(regs); + + if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){ + bad_segv(*fi, UPT_IP(regs)); + return; + } + segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs); +} + struct kern_handlers handlinfo_kern = { .relay_signal = relay_signal, .winch = winch, |