xref: /linux/arch/x86/um/stub_segv.c (revision bf9a76a470d83355200adaa5d5b55d118f229ecb)
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>
9530ba6c7SJason A. Donenfeld #include <sys/ucontext.h>
105c48b108SAl Viro 
11*bf9a76a4SLinus Torvalds void __attribute__ ((__section__ (".__syscall_stub")))
125c48b108SAl Viro stub_segv_handler(int sig, siginfo_t *info, void *p)
135c48b108SAl Viro {
144d1a535bSKrzysztof Mazur 	ucontext_t *uc = p;
155c48b108SAl Viro 
165c48b108SAl Viro 	GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
175c48b108SAl Viro 			      &uc->uc_mcontext);
185c48b108SAl Viro 	trap_myself();
195c48b108SAl Viro }
205c48b108SAl Viro 
21