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 299586 Details for
Bug 437970
ppc kernel hardware watchpoint support
[?]
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]
Upstream fix.
ppcdabr (text/plain), 3.89 KB, created by
Jan Kratochvil
on 2008-03-29 17:30:27 UTC
(
hide
)
Description:
Upstream fix.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2008-03-29 17:30:27 UTC
Size:
3.89 KB
patch
obsolete
>Return-Path: <michael@ozlabs.org> >Received: from localhost > by host0.dyn.jankratochvil.net with IMAP (fetchmail-6.3.8) > for <jkratoch@localhost> (single-drop); Fri, 28 Mar 2008 09:12:12 +0100 (CET) >Received: from pobox.devel.redhat.com ([unix socket]) > by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA; > Fri, 28 Mar 2008 04:12:08 -0400 >X-Sieve: CMU Sieve 2.2 >Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) > by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id m2S8C8Yd032302; > Fri, 28 Mar 2008 04:12:08 -0400 >Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) > by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2S8C51O005453; > Fri, 28 Mar 2008 04:12:05 -0400 >Received: from ozlabs.org (ozlabs.org [203.10.76.45]) > by mx3.redhat.com (8.13.8/8.13.8) with ESMTP id m2S8Bsxr020745; > Fri, 28 Mar 2008 04:11:55 -0400 >Received: by ozlabs.org (Postfix, from userid 1034) > id 7C499DDE9E; Fri, 28 Mar 2008 19:11:48 +1100 (EST) >To: Paul Mackerras <paulus@samba.org> >Cc: <jan.kratochvil@redhat.com>, <roland@redhat.com>, > Benjamin Herrenschmidt <benh@kernel.crashing.org>, > Anton Blanchard <anton@samba.org> >Message-Id: <deeb6bcad042aec876919ef77d3b39b4b1c20784.1206691670.git.michael@ellerman.id.au> >From: Michael Ellerman <michael@ellerman.id.au> >Subject: [PATCH] Fix missed hardware breakpoints across multiple threads >Date: Fri, 28 Mar 2008 19:11:48 +1100 (EST) >X-RedHat-Spam-Score: -0.15 >X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 >X-Scanned-By: MIMEDefang 2.63 on 172.16.48.32 >Status: RO >Content-Length: 2356 >Lines: 70 > >There is a bug in the powerpc DABR (data access breakpoint) handling, >which can result in us missing breakpoints if several threads are trying >to break on the same address. > >The circumstances are that do_page_fault() calls do_dabr(), this clears >the DABR (sets it to 0) and sets up the signal which will report to >userspace that the DABR was hit. The do_signal() code will restore the DABR >value on the way out to userspace. > >If we reschedule before calling do_signal(), __switch_to() will check the >cached DABR value and compare it to the new thread's value, if they match >we don't set the DABR in hardware. > >So if two threads have the same DABR value, and we schedule from one to >the other after taking the interrupt for the first thread hitting the DABR, >the second thread will run without the DABR set in hardware. > >The cleanest fix is to move the cache update into set_dabr(), that way we >can't forget to do it. > >Reported-by: Jan Kratochvil <jan.kratochvil@redhat.com> >Signed-off-by: Michael Ellerman <michael@ellerman.id.au> >--- > arch/powerpc/kernel/process.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > >Paul, your call on if this is 25 or 26 material. > > >diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c >index 59311ec..4ec6055 100644 >--- a/arch/powerpc/kernel/process.c >+++ b/arch/powerpc/kernel/process.c >@@ -241,8 +241,12 @@ void discard_lazy_cpu_state(void) > } > #endif /* CONFIG_SMP */ > >+static DEFINE_PER_CPU(unsigned long, current_dabr); >+ > int set_dabr(unsigned long dabr) > { >+ __get_cpu_var(current_dabr) = dabr; >+ > #ifdef CONFIG_PPC_MERGE /* XXX for now */ > if (ppc_md.set_dabr) > return ppc_md.set_dabr(dabr); >@@ -259,8 +263,6 @@ int set_dabr(unsigned long dabr) > DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); > #endif > >-static DEFINE_PER_CPU(unsigned long, current_dabr); >- > struct task_struct *__switch_to(struct task_struct *prev, > struct task_struct *new) > { >@@ -325,10 +327,8 @@ struct task_struct *__switch_to(struct task_struct *prev, > > #endif /* CONFIG_SMP */ > >- if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) { >+ if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) > set_dabr(new->thread.dabr); >- __get_cpu_var(current_dabr) = new->thread.dabr; >- } > > new_thread = &new->thread; > old_thread = ¤t->thread; >-- >1.5.2.rc1.1884.g59b20 >
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 437970
: 299586