blob: 1518d2805ae81733eb0629989f4d39ae595502c2 [file] [log] [blame]
Jeff Diked67b5692005-07-07 17:56:49 -07001/*
Jeff Dikeee3d9bd2008-02-04 22:30:56 -08002 * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
Jeff Diked67b5692005-07-07 17:56:49 -07003 * Licensed under the GPL
4 */
5
Al Viro37185b32012-10-08 03:27:32 +01006#include <sysdep/stub.h>
7#include <sysdep/faultinfo.h>
8#include <sysdep/mcontext.h>
Jeff Diked67b5692005-07-07 17:56:49 -07009
10void __attribute__ ((__section__ (".__syscall_stub")))
Al Viro9b25fcb2011-08-18 20:04:09 +010011stub_segv_handler(int sig, siginfo_t *info, void *p)
Jeff Diked67b5692005-07-07 17:56:49 -070012{
Al Viro9b25fcb2011-08-18 20:04:09 +010013 struct ucontext *uc = p;
Jeff Diked67b5692005-07-07 17:56:49 -070014
Al Viro248b74c2011-08-18 20:05:09 +010015 GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
Jeff Dike50f72b52005-10-09 16:11:44 -040016 &uc->uc_mcontext);
Jeff Dikeee3d9bd2008-02-04 22:30:56 -080017 trap_myself();
Jeff Diked67b5692005-07-07 17:56:49 -070018}
Jeff Dikeee3d9bd2008-02-04 22:30:56 -080019