Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 261921 Details for
Bug 387821
ptrace: AltiVec PTRACE_GETVRREGS returns invalid VRSAVE
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
kernel reportedly-fix by Roland McGrath.
linux-2.6-utrace-powerpc-altivec.patch (text/plain), 1.98 KB, created by
Jan Kratochvil
on 2007-11-16 22:48:28 UTC
(
hide
)
Description:
kernel reportedly-fix by Roland McGrath.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2007-11-16 22:48:28 UTC
Size:
1.98 KB
patch
obsolete
>commit bc3f55c45a0634dad68d06fff9f58f3ba802dfed >Author: Roland McGrath <roland@redhat.com> >Date: Thu Nov 1 04:48:58 2007 -0700 > > Fix powerpc Altivec regset access for vrsave slot. > >diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c >index 325ed27..2a58838 100644 >--- a/arch/powerpc/kernel/ptrace.c >+++ b/arch/powerpc/kernel/ptrace.c >@@ -200,15 +200,26 @@ vrregs_get(struct task_struct *target, > unsigned int pos, unsigned int count, > void *kbuf, void __user *ubuf) > { >+ int ret; >+ > BUILD_BUG_ON(offsetof(struct thread_struct, vscr) > != offsetof(struct thread_struct, vr[32])); >- BUILD_BUG_ON(offsetof(struct thread_struct, vscr) + sizeof(vector128) >- != offsetof(struct thread_struct, vrsave)); > > flush_altivec_to_thread(target); > >- return utrace_regset_copyout(&pos, &count, &kbuf, &ubuf, >- &target->thread.vr, 0, -1); >+ ret = utrace_regset_copyout(&pos, &count, &kbuf, &ubuf, >+ &target->thread.vr, >+ 0, 33 * sizeof(vector128)); >+ if (ret == 0 && count > 0) { >+ /* >+ * Copy out only the low-order word of vrsave. >+ */ >+ u32 vrsave = target->thread.vrsave; >+ ret = utrace_regset_copyout(&pos, &count, &kbuf, &ubuf, &vrsave, >+ 33 * sizeof(vector128), -1); >+ } >+ >+ return ret; > } > > static int >@@ -217,10 +228,25 @@ vrregs_set(struct task_struct *target, > unsigned int pos, unsigned int count, > const void *kbuf, const void __user *ubuf) > { >+ int ret; >+ > flush_altivec_to_thread(target); > >- return utrace_regset_copyin(&pos, &count, &kbuf, &ubuf, >- &target->thread.vr, 0, -1); >+ ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf, >+ &target->thread.vr, >+ 0, 33 * sizeof(vector128)); >+ if (ret == 0 && count > 0) { >+ /* >+ * Copy in only the low-order word of vrsave. >+ */ >+ u32 vrsave; >+ ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave, >+ 33 * sizeof(vector128), -1); >+ if (ret == 0) >+ target->thread.vrsave = vrsave; >+ } >+ >+ return ret; > } > #endif /* CONFIG_ALTIVEC */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 387821
: 261921