public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 00/18] x86, bts, ptrace, hw-branch-tracer: fixes and cleanups
@ 2009-04-02 14:54 markus.t.metzger
  2009-04-02 14:54 ` [patch 01/18] x86, bts: fix race when bts tracer is removed markus.t.metzger
                   ` (18 more replies)
  0 siblings, 19 replies; 34+ messages in thread
From: markus.t.metzger @ 2009-04-02 14:54 UTC (permalink / raw)
  To: mingo, tglx, hpa
  Cc: markus.t.metzger, roland, eranian, oleg, juan.villacis, ak,
	linux-kernel

-- 
Patches 1-5 fix races with context swithcing code when the branch traced task
is currently running.

In the worst case, this might cause context switch code to access freed
memory or the tracing hardware to continue tracing into a freed buffer.
Both might crash the kernel.

The first 4 patches apply to .29 using the below preparation patch.


The remaining patches fix bugs in the context of per-cpu tracing (i.e.
hw-branch-tracer) and pebs, add more selftest code, and do some cleanups.


Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
---

Index: linux-2.6.29/arch/x86/kernel/ds.c
===================================================================
--- linux-2.6.29.orig/arch/x86/kernel/ds.c	2009-04-01 17:39:55.000000000 +0200
+++ linux-2.6.29/arch/x86/kernel/ds.c	2009-04-01 17:40:42.000000000 +0200
@@ -78,8 +78,8 @@ struct bts_tracer {
 	struct ds_tracer ds;
 	/* the trace including the DS configuration */
 	struct bts_trace trace;
-	/* buffer overflow notification function */
-	bts_ovfl_callback_t ovfl;
+	/* Buffer overflow notification function: */
+	bts_ovfl_callback_t	ovfl;
 };
 
 struct pebs_tracer {
Index: linux-2.6.29/arch/x86/kernel/ptrace.c
===================================================================
--- linux-2.6.29.orig/arch/x86/kernel/ptrace.c	2009-04-01 17:39:55.000000000 +0200
+++ linux-2.6.29/arch/x86/kernel/ptrace.c	2009-04-01 17:40:42.000000000 +0200
@@ -21,6 +21,7 @@
 #include <linux/audit.h>
 #include <linux/seccomp.h>
 #include <linux/signal.h>
+#include <linux/ftrace.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2009-04-03 11:37 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 14:54 [patch 00/18] x86, bts, ptrace, hw-branch-tracer: fixes and cleanups markus.t.metzger
2009-04-02 14:54 ` [patch 01/18] x86, bts: fix race when bts tracer is removed markus.t.metzger
2009-04-02 18:45   ` Ingo Molnar
2009-04-03  6:19     ` Metzger, Markus T
2009-04-03  7:17       ` Metzger, Markus T
2009-04-03 11:30         ` Ingo Molnar
2009-04-03 11:29       ` Ingo Molnar
2009-04-02 14:54 ` [patch 02/18] sched: add task_is_running() fucntion to sched.h markus.t.metzger
2009-04-02 14:54 ` [patch 03/18] x86, ptrace, bts: defer branch trace stopping markus.t.metzger
2009-04-02 18:40   ` Ingo Molnar
2009-04-02 14:54 ` [patch 04/18] x86, bts: wait until traced task has been scheduled out markus.t.metzger
2009-04-02 19:17   ` Ingo Molnar
2009-04-03  6:22     ` Metzger, Markus T
2009-04-03 11:32       ` Ingo Molnar
2009-04-03 11:36         ` Metzger, Markus T
2009-04-02 14:55 ` [patch 05/18] x86, bts: fix race between per-task and per-cpu branch tracing markus.t.metzger
2009-04-02 14:55 ` [patch 06/18] x86, debugctlmsr: add _on_cpu variants to debugctlmsr functions markus.t.metzger
2009-04-02 14:55 ` [patch 07/18] x86, bts, hw-branch-tracer: add _noirq variants to the debug store interface markus.t.metzger
2009-04-02 14:55 ` [patch 08/18] x86, hw-branch-tracer: allocate selftest iterator on heap markus.t.metzger
2009-04-02 14:55 ` [patch 09/18] x86, ds: fix compiler warning markus.t.metzger
2009-04-02 14:55 ` [patch 10/18] x86, ds: fix bounds check in ds selftest markus.t.metzger
2009-04-02 14:55 ` [patch 11/18] x86, ds: selftest each cpu markus.t.metzger
2009-04-02 14:55 ` [patch 12/18] x86, ds: add task tracing selftest markus.t.metzger
2009-04-02 14:55 ` [patch 13/18] x86, ds: add leakage warning markus.t.metzger
2009-04-02 19:27   ` Ingo Molnar
2009-04-03  6:42     ` Metzger, Markus T
2009-04-02 14:55 ` [patch 14/18] x86, ds: use single debug store cpu configuration markus.t.metzger
2009-04-02 19:29   ` Ingo Molnar
2009-04-03  6:46     ` Metzger, Markus T
2009-04-02 14:55 ` [patch 15/18] x86, ptrace: remove duplicate functionality markus.t.metzger
2009-04-02 14:55 ` [patch 16/18] x86, ds: dont use TIF_DEBUGCTLMSR markus.t.metzger
2009-04-02 14:55 ` [patch 17/18] x86, ds: fix bad ds_reset_pebs() markus.t.metzger
2009-04-02 14:55 ` [patch 18/18] x86, ds: support Core i7 markus.t.metzger
2009-04-02 19:22 ` [patch 00/18] x86, bts, ptrace, hw-branch-tracer: fixes and cleanups Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox