mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 05:06:44 +07:00
ee3d9bd4de
Simplify the page fault stub by not masking signals while it is running. This allows it to signal that it is done by executing an instruction which will generate a SIGTRAP (int3 on x86) rather than running sigreturn by hand after queueing a blocked SIGUSR1. userspace_tramp now no longer puts anything in the SIGSEGV sa_mask, but it does add SA_NODEFER to sa_flags so that SIGSEGV is still enabled after the signal handler fails to run sigreturn. SIGWINCH is just blocked so that we don't have to deal with it and the signal masks used by wait_stub_done are updated to reflect the smaller number of signals that it has to worry about. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18 lines
390 B
C
18 lines
390 B
C
/*
|
|
* Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
|
* Licensed under the GPL
|
|
*/
|
|
|
|
#include "sysdep/stub.h"
|
|
#include "sysdep/sigcontext.h"
|
|
|
|
void __attribute__ ((__section__ (".__syscall_stub")))
|
|
stub_segv_handler(int sig)
|
|
{
|
|
struct sigcontext *sc = (struct sigcontext *) (&sig + 1);
|
|
|
|
GET_FAULTINFO_FROM_SC(*((struct faultinfo *) STUB_DATA), sc);
|
|
|
|
trap_myself();
|
|
}
|