Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 1 | /* |
Jeff Dike | ee3d9bd | 2008-02-04 22:30:56 -0800 | [diff] [blame] | 2 | * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 3 | * Licensed under the GPL |
4 | */ | ||||
5 | |||||
Al Viro | 37185b3 | 2012-10-08 03:27:32 +0100 | [diff] [blame] | 6 | #include <sysdep/stub.h> |
7 | #include <sysdep/faultinfo.h> | ||||
8 | #include <sysdep/mcontext.h> | ||||
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 9 | |
10 | void __attribute__ ((__section__ (".__syscall_stub"))) | ||||
Al Viro | 9b25fcb | 2011-08-18 20:04:09 +0100 | [diff] [blame] | 11 | stub_segv_handler(int sig, siginfo_t *info, void *p) |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 12 | { |
Al Viro | 9b25fcb | 2011-08-18 20:04:09 +0100 | [diff] [blame] | 13 | struct ucontext *uc = p; |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 14 | |
Al Viro | 248b74c | 2011-08-18 20:05:09 +0100 | [diff] [blame] | 15 | GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA), |
Jeff Dike | 50f72b5 | 2005-10-09 16:11:44 -0400 | [diff] [blame] | 16 | &uc->uc_mcontext); |
Jeff Dike | ee3d9bd | 2008-02-04 22:30:56 -0800 | [diff] [blame] | 17 | trap_myself(); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 18 | } |
Jeff Dike | ee3d9bd | 2008-02-04 22:30:56 -0800 | [diff] [blame] | 19 |