diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-02-07 20:58:43 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-08 00:12:32 (GMT) |
commit | e2216feb37f1df65a29fb1e5ed41d9f7ba657b2c (patch) | |
tree | 445da277a6f0202c6de853474f846467bf2dd7b7 /arch/um/sys-x86_64 | |
parent | 43b00fdbb13bfc1b2f4a8e5b65315db6d9c479a3 (diff) | |
download | linux-e2216feb37f1df65a29fb1e5ed41d9f7ba657b2c.tar.xz |
[PATCH] uml: initialize process FP registers properly
We weren't making sure that we initialized the FP registers of new processes
to sane values.
This patch also moves some defines in the affected area closer to where they
are used.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
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/ptrace_user.c | 7 | ||||
-rw-r--r-- | arch/um/sys-x86_64/user-offsets.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/um/sys-x86_64/ptrace_user.c b/arch/um/sys-x86_64/ptrace_user.c index 12e404c..b5f9c33 100644 --- a/arch/um/sys-x86_64/ptrace_user.c +++ b/arch/um/sys-x86_64/ptrace_user.c @@ -24,6 +24,13 @@ int ptrace_setregs(long pid, unsigned long *regs) return(0); } +int ptrace_setfpregs(long pid, unsigned long *regs) +{ + if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0) + return -errno; + return 0; +} + void ptrace_pokeuser(unsigned long addr, unsigned long data) { panic("ptrace_pokeuser"); diff --git a/arch/um/sys-x86_64/user-offsets.c b/arch/um/sys-x86_64/user-offsets.c index 5a585bf..7bd54a9 100644 --- a/arch/um/sys-x86_64/user-offsets.c +++ b/arch/um/sys-x86_64/user-offsets.c @@ -57,7 +57,7 @@ void foo(void) #endif DEFINE_LONGS(HOST_FRAME_SIZE, FRAME_SIZE); - DEFINE(HOST_FP_SIZE, 0); + DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long)); DEFINE(HOST_XFP_SIZE, 0); DEFINE_LONGS(HOST_RBX, RBX); DEFINE_LONGS(HOST_RCX, RCX); |