xref: /linux/arch/x86/um/stub_segv.c (revision 4d1a535b8ec5e74b42dfd9dc809142653b2597f6)
15c48b108SAl Viro /*
25c48b108SAl Viro  * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
35c48b108SAl Viro  * Licensed under the GPL
45c48b108SAl Viro  */
55c48b108SAl Viro 
637185b33SAl Viro #include <sysdep/stub.h>
737185b33SAl Viro #include <sysdep/faultinfo.h>
837185b33SAl Viro #include <sysdep/mcontext.h>
95c48b108SAl Viro 
105c48b108SAl Viro void __attribute__ ((__section__ (".__syscall_stub")))
115c48b108SAl Viro stub_segv_handler(int sig, siginfo_t *info, void *p)
125c48b108SAl Viro {
13*4d1a535bSKrzysztof Mazur 	ucontext_t *uc = p;
145c48b108SAl Viro 
155c48b108SAl Viro 	GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
165c48b108SAl Viro 			      &uc->uc_mcontext);
175c48b108SAl Viro 	trap_myself();
185c48b108SAl Viro }
195c48b108SAl Viro 
20