aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/sysdep-x86_64
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-09-26 02:33:04 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 11:49:07 -0400
commit4b84c69b5f6c08a540e3683f1360a6cdef2806c7 (patch)
tree708f1e4cbc2771886aaeb8eadb3ae4d458bc8133 /arch/um/include/sysdep-x86_64
parent19bdf0409f25a85a45874a5a8da6f3e4edcf4a49 (diff)
[PATCH] uml: Move signal handlers to arch code
Have most signals go through an arch-provided handler which recovers the sigcontext and then calls a generic handler. This replaces the ARCH_GET_SIGCONTEXT macro, which was somewhat fragile. On x86_64, recovering %rdx (which holds the sigcontext pointer) must be the first thing that happens. sig_handler duly invokes that first, but there is no guarantee that I can see that instructions won't be reordered such that %rdx is used before that. Having the arch provide the handler seems much more robust. Some signals in some parts of UML require their own handlers - these places don't call set_handler any more. They call sigaction or signal themselves. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/include/sysdep-x86_64')
-rw-r--r--arch/um/include/sysdep-x86_64/signal.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/um/include/sysdep-x86_64/signal.h b/arch/um/include/sysdep-x86_64/signal.h
deleted file mode 100644
index 6142897af3d1..000000000000
--- a/arch/um/include/sysdep-x86_64/signal.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (C) 2004 PathScale, Inc
3 * Licensed under the GPL
4 */
5
6#ifndef __X86_64_SIGNAL_H_
7#define __X86_64_SIGNAL_H_
8
9#define ARCH_SIGHDLR_PARAM int sig
10
11#define ARCH_GET_SIGCONTEXT(sc, sig_addr) \
12 do { \
13 struct ucontext *__uc; \
14 asm("movq %%rdx, %0" : "=r" (__uc)); \
15 sc = (struct sigcontext *) &__uc->uc_mcontext; \
16 } while(0)
17
18#endif
19
20/*
21 * Overrides for Emacs so that we follow Linus's tabbing style.
22 * Emacs will notice this stuff at the end of the file and automatically
23 * adjust the settings for this buffer only. This must remain at the end
24 * of the file.
25 * ---------------------------------------------------------------------------
26 * Local variables:
27 * c-file-style: "linux"
28 * End:
29 */