summaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-04-18 22:21:44 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-19 09:13:51 -0700
commitfb30d64568fd8f6a21afef987f11852a109723da (patch)
treef5cb57a46f237bb3500743d3421d2ec95849e38a /arch/um/sys-x86_64
parent966a082f80a073af1564c5ed6313ef2f0587dde3 (diff)
downloadkernel-crypto-fb30d64568fd8f6a21afef987f11852a109723da.tar.gz
kernel-crypto-fb30d64568fd8f6a21afef987f11852a109723da.tar.xz
kernel-crypto-fb30d64568fd8f6a21afef987f11852a109723da.zip
[PATCH] uml: add missing __volatile__
We were missing __volatile__ on some bits of asm in the segfault handlers. On x86_64, this was messing up the move from %rdx to uc because that was moved to after the GET_FAULTINFO_FROM_SC, which changed %rdx. Also changed the other bit of asm and the one in the i386 handler to prevent any similar occurrences. 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/sys-x86_64')
-rw-r--r--arch/um/sys-x86_64/stub_segv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/um/sys-x86_64/stub_segv.c b/arch/um/sys-x86_64/stub_segv.c
index a2709953319..1c967026c95 100644
--- a/arch/um/sys-x86_64/stub_segv.c
+++ b/arch/um/sys-x86_64/stub_segv.c
@@ -33,7 +33,7 @@ stub_segv_handler(int sig)
struct ucontext *uc;
int pid;
- __asm__("movq %%rdx, %0" : "=g" (uc) :);
+ __asm__ __volatile__("movq %%rdx, %0" : "=g" (uc) :);
GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA),
&uc->uc_mcontext);
@@ -44,8 +44,8 @@ stub_segv_handler(int sig)
* the signal frame. So, we use the ucontext pointer, which we know
* already, to get the signal frame pointer, and add 8 to that.
*/
- __asm__("movq %0, %%rsp; movq %1, %%rax ; syscall": :
- "g" ((unsigned long) container_of(uc, struct rt_sigframe,
- uc) + 8),
- "g" (__NR_rt_sigreturn));
+ __asm__ __volatile__("movq %0, %%rsp; movq %1, %%rax ; syscall": :
+ "g" ((unsigned long)
+ container_of(uc, struct rt_sigframe, uc) + 8),
+ "g" (__NR_rt_sigreturn));
}