* [PATCH 1/3] powerpc: correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes
2008-07-28 15:13 [PATCH 0/3] powerpc: VSX ptrace bug fixes for 2.6.27 Michael Neuling
2008-07-28 15:13 ` [PATCH 3/3] powerpc: fix setting the wrong thread_struct for ptrace get/set VSX regs Michael Neuling
2008-07-28 15:13 ` [PATCH 2/3] powerpc: fix ptrace buffer size for VSX Michael Neuling
@ 2008-07-28 15:13 ` Michael Neuling
2 siblings, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2008-07-28 15:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev
Fix bug where PTRACE_GET/SETVSRREGS are not connected for 32 bit processes.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
arch/powerpc/kernel/ptrace32.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-2.6-ozlabs/arch/powerpc/kernel/ptrace32.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/ptrace32.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/ptrace32.c
@@ -294,6 +294,8 @@ long compat_arch_ptrace(struct task_stru
case PTRACE_SETFPREGS:
case PTRACE_GETVRREGS:
case PTRACE_SETVRREGS:
+ case PTRACE_GETVSRREGS:
+ case PTRACE_SETVSRREGS:
case PTRACE_GETREGS64:
case PTRACE_SETREGS64:
case PPC_PTRACE_GETFPREGS:
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/3] powerpc: VSX ptrace bug fixes for 2.6.27
@ 2008-07-28 15:13 Michael Neuling
2008-07-28 15:13 ` [PATCH 3/3] powerpc: fix setting the wrong thread_struct for ptrace get/set VSX regs Michael Neuling
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Neuling @ 2008-07-28 15:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev
Below are a few bug fixes for VSX ptrace for 2.6.27.
Thanks to Luis Machado for helping find these with his VSX GDB work.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] powerpc: fix setting the wrong thread_struct for ptrace get/set VSX regs
2008-07-28 15:13 [PATCH 0/3] powerpc: VSX ptrace bug fixes for 2.6.27 Michael Neuling
@ 2008-07-28 15:13 ` Michael Neuling
2008-07-28 15:13 ` [PATCH 2/3] powerpc: fix ptrace buffer size for VSX Michael Neuling
2008-07-28 15:13 ` [PATCH 1/3] powerpc: correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes Michael Neuling
2 siblings, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2008-07-28 15:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev
In PTRACE_GET/SETVSRREGS, we should be using the thread we are
ptracing rather than current.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
arch/powerpc/kernel/ptrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-ozlabs/arch/powerpc/kernel/ptrace.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/ptrace.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/ptrace.c
@@ -374,7 +374,7 @@ static int vsr_get(struct task_struct *t
flush_vsx_to_thread(target);
for (i = 0; i < 32 ; i++)
- buf[i] = current->thread.fpr[i][TS_VSRLOWOFFSET];
+ buf[i] = target->thread.fpr[i][TS_VSRLOWOFFSET];
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
buf, 0, 32 * sizeof(double));
@@ -393,7 +393,7 @@ static int vsr_set(struct task_struct *t
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
buf, 0, 32 * sizeof(double));
for (i = 0; i < 32 ; i++)
- current->thread.fpr[i][TS_VSRLOWOFFSET] = buf[i];
+ target->thread.fpr[i][TS_VSRLOWOFFSET] = buf[i];
return ret;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] powerpc: fix ptrace buffer size for VSX
2008-07-28 15:13 [PATCH 0/3] powerpc: VSX ptrace bug fixes for 2.6.27 Michael Neuling
2008-07-28 15:13 ` [PATCH 3/3] powerpc: fix setting the wrong thread_struct for ptrace get/set VSX regs Michael Neuling
@ 2008-07-28 15:13 ` Michael Neuling
2008-07-28 15:13 ` [PATCH 1/3] powerpc: correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes Michael Neuling
2 siblings, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2008-07-28 15:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev
Fix cut-and-paste error in the size setting for ptrace buffers for VSX.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
arch/powerpc/kernel/ptrace.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: linux-2.6-ozlabs/arch/powerpc/kernel/ptrace.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/ptrace.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/ptrace.c
@@ -913,15 +913,13 @@ long arch_ptrace(struct task_struct *chi
case PTRACE_GETVSRREGS:
return copy_regset_to_user(child, &user_ppc_native_view,
REGSET_VSX,
- 0, (32 * sizeof(vector128) +
- sizeof(u32)),
+ 0, 32 * sizeof(double),
(void __user *) data);
case PTRACE_SETVSRREGS:
return copy_regset_from_user(child, &user_ppc_native_view,
REGSET_VSX,
- 0, (32 * sizeof(vector128) +
- sizeof(u32)),
+ 0, 32 * sizeof(double),
(const void __user *) data);
#endif
#ifdef CONFIG_SPE
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-28 15:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 15:13 [PATCH 0/3] powerpc: VSX ptrace bug fixes for 2.6.27 Michael Neuling
2008-07-28 15:13 ` [PATCH 3/3] powerpc: fix setting the wrong thread_struct for ptrace get/set VSX regs Michael Neuling
2008-07-28 15:13 ` [PATCH 2/3] powerpc: fix ptrace buffer size for VSX Michael Neuling
2008-07-28 15:13 ` [PATCH 1/3] powerpc: correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes Michael Neuling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).