1*5c48b108SAl Viro /* 2*5c48b108SAl Viro * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 3*5c48b108SAl Viro * Licensed under the GPL 4*5c48b108SAl Viro */ 5*5c48b108SAl Viro 6*5c48b108SAl Viro #include "sysdep/stub.h" 7*5c48b108SAl Viro #include "sysdep/faultinfo.h" 8*5c48b108SAl Viro #include "sysdep/mcontext.h" 9*5c48b108SAl Viro 10*5c48b108SAl Viro void __attribute__ ((__section__ (".__syscall_stub"))) 11*5c48b108SAl Viro stub_segv_handler(int sig, siginfo_t *info, void *p) 12*5c48b108SAl Viro { 13*5c48b108SAl Viro struct ucontext *uc = p; 14*5c48b108SAl Viro 15*5c48b108SAl Viro GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA), 16*5c48b108SAl Viro &uc->uc_mcontext); 17*5c48b108SAl Viro trap_myself(); 18*5c48b108SAl Viro } 19*5c48b108SAl Viro 20