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 | |
Jeff Dike | 17d4697 | 2005-11-21 21:32:09 -0800 | [diff] [blame] | 6 | #include "sysdep/stub.h" |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 7 | #include "sysdep/sigcontext.h" |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 8 | |
| 9 | void __attribute__ ((__section__ (".__syscall_stub"))) |
| 10 | stub_segv_handler(int sig) |
| 11 | { |
| 12 | struct sigcontext *sc = (struct sigcontext *) (&sig + 1); |
| 13 | |
Jeff Dike | 54ae36f | 2007-10-16 01:27:33 -0700 | [diff] [blame] | 14 | GET_FAULTINFO_FROM_SC(*((struct faultinfo *) STUB_DATA), sc); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 15 | |
Jeff Dike | ee3d9bd | 2008-02-04 22:30:56 -0800 | [diff] [blame] | 16 | trap_myself(); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 17 | } |