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 261901 Details for
Bug 387741
GDB hardware watchpoint support for Power.
[?]
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 fix by Roland McGrath.
linux-2.6-utrace-powerpc-debugreg.patch (text/plain), 4.23 KB, created by
Jan Kratochvil
on 2007-11-16 22:19:00 UTC
(
hide
)
Description:
kernel fix by Roland McGrath.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2007-11-16 22:19:00 UTC
Size:
4.23 KB
patch
obsolete
>backport from upstream utrace-ptrace-compat branch: > > commit 970f4d638662024473f585dbb784668faa6f23ed > Author: Roland McGrath <roland@redhat.com> > Date: Wed Oct 31 13:45:18 2007 -0700 > > Fix powerpc PTRACE_SET_DEBUGREG, takes value, not address of value. > >--- linux-2.6.18/arch/i386/kernel/ptrace.c.test >+++ linux-2.6.18/arch/i386/kernel/ptrace.c >@@ -787,7 +787,7 @@ int arch_ptrace(long *req, struct task_s > case PTRACE_SET_THREAD_AREA: > return ptrace_onereg_access(child, engine, > utrace_native_view(current), 3, >- addr, (void __user *)data, >+ addr, (void __user *)data, NULL, > *req == PTRACE_SET_THREAD_AREA); > } > return -ENOSYS; >--- linux-2.6.18/arch/x86_64/ia32/ptrace32.c.test >+++ linux-2.6.18/arch/x86_64/ia32/ptrace32.c >@@ -641,6 +641,7 @@ int arch_compat_ptrace(compat_long_t *re > &utrace_ia32_view, 3, > addr, > (void __user *)(unsigned long)data, >+ NULL, > *req == PTRACE_SET_THREAD_AREA); > } > return -ENOSYS; >--- linux-2.6.18/arch/x86_64/kernel/ptrace.c.test >+++ linux-2.6.18/arch/x86_64/kernel/ptrace.c >@@ -746,7 +746,7 @@ int arch_ptrace(long *req, struct task_s > case PTRACE_SET_THREAD_AREA: > return ptrace_onereg_access(child, engine, > &utrace_ia32_view, 3, >- addr, (void __user *)data, >+ addr, (void __user *)data, NULL, > *req == PTRACE_SET_THREAD_AREA); > #endif > /* normal 64bit interface to access TLS data. >--- linux-2.6.18/arch/powerpc/kernel/ptrace.c.test >+++ linux-2.6.18/arch/powerpc/kernel/ptrace.c >@@ -501,11 +501,14 @@ int arch_ptrace(long *request, struct ta > *request == PPC_PTRACE_SETFPREGS); > #ifdef CONFIG_PPC64 > case PTRACE_GET_DEBUGREG: >- case PTRACE_SET_DEBUGREG: > return ptrace_onereg_access(child, engine, > utrace_native_view(current), 3, > addr, (unsigned long __user *)data, >- *request == PTRACE_SET_DEBUGREG); >+ NULL, 0); >+ case PTRACE_SET_DEBUGREG: >+ return ptrace_onereg_access(child, engine, >+ utrace_native_view(current), 3, >+ addr, NULL, &data, 1); > #endif /* CONFIG_PPC64 */ > #ifdef CONFIG_ALTIVEC > case PTRACE_GETVRREGS: >@@ -576,13 +579,15 @@ int arch_compat_ptrace(compat_long_t *re > return ptrace_whole_regset(child, engine, data, 2, 1); > #endif > case PTRACE_GET_DEBUGREG: >- case PTRACE_SET_DEBUGREG: > return ptrace_onereg_access(child, engine, > utrace_native_view(current), 3, > addr, >- (unsigned long __user *) >- (unsigned long) data, >- *request == PTRACE_SET_DEBUGREG); >+ (u32 __user *) (unsigned long) data, >+ NULL, 0); >+ case PTRACE_SET_DEBUGREG: >+ return ptrace_onereg_access(child, engine, >+ utrace_native_view(current), 3, >+ addr, NULL, &data, 1); > > /* > * Read 4 bytes of the other process' storage >--- linux-2.6.18/kernel/ptrace.c.test >+++ linux-2.6.18/kernel/ptrace.c >@@ -720,7 +720,7 @@ ptrace_onereg_access(struct task_struct > struct utrace_attached_engine *engine, > const struct utrace_regset_view *view, > int setno, unsigned long regno, >- void __user *data, int write) >+ void __user *udata, void *kdata, int write) > { > const struct utrace_regset *regset = utrace_regset(target, engine, > view, setno); >@@ -736,18 +736,20 @@ ptrace_onereg_access(struct task_struct > pos = (regno - regset->bias) * regset->size; > > if (write) { >- if (!access_ok(VERIFY_READ, data, regset->size)) >+ if (kdata == NULL && >+ !access_ok(VERIFY_READ, udata, regset->size)) > ret = -EIO; > else > ret = (*regset->set)(target, regset, pos, regset->size, >- NULL, data); >+ kdata, udata); > } > else { >- if (!access_ok(VERIFY_WRITE, data, regset->size)) >+ if (kdata == NULL && >+ !access_ok(VERIFY_WRITE, udata, regset->size)) > ret = -EIO; > else > ret = (*regset->get)(target, regset, pos, regset->size, >- NULL, data); >+ kdata, udata); > } > > return ret; >--- linux-2.6.18/include/linux/ptrace.h.test >+++ linux-2.6.18/include/linux/ptrace.h >@@ -117,7 +117,7 @@ extern int ptrace_onereg_access(struct t > struct utrace_attached_engine *engine, > const struct utrace_regset_view *view, > int setno, unsigned long regno, >- void __user *data, int write); >+ void __user *udata, void *kdata, int write); > > > /*
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 387741
: 261901