x86, ptrace, bts, hw-branch-tracer: fixes and cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest20 patches 29 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | x86, bts: fix race when bts tracer is removedarch/ | +37 | 1 reply | |
| 2/20 | sched: add wait_task_context_switch() fucntion to sched.hinclude/ kernel/ | +45 | 1 reply | |
| 3/20 | x86, ptrace, bts: defer branch trace stoppingarch/ arch/ include/ +2 more | +179 | 7 replies | |
| 4/20 | x86, bts: wait until traced task has been scheduled outarch/ | +19 | 1 reply | |
| 5/20 | x86, bts: fix race between per-task and per-cpu branch tracingarch/ | +41 | 1 reply | |
| 6/20 | x86, bts: use trace_clock_global() for timestampsarch/ arch/ | +11 | 1 reply | |
| 7/20 | x86, debugctlmsr: add _on_cpu variants to debugctlmsr functionsarch/ | +27 | 1 reply | |
| 8/20 | x86, bts, hw-branch-tracer: add _noirq variants to the debug store interfacearch/ arch/ arch/ +2 more | +492 | 1 reply | |
| 9/20 | x86, hw-branch-tracer: allocate selftest iterator on heapkernel/ | +12 | 1 reply | |
| 10/20 | x86, ds: fix compiler warningarch/ | +1 | 1 reply | |
| 11/20 | x86, ds: fix bounds check in ds selftestarch/ | +6 | 1 reply | |
| 12/20 | x86, ds: selftest each cpuarch/ | +137 | 1 reply | |
| 13/20 | x86, ds: add task tracing selftestarch/ | +71 | 1 reply | |
| 14/20 | x86, ds: add leakage warningarch/ arch/ arch/ +3 more | +8 | 1 reply | |
| 15/20 | x86, ds: use single debug store cpu configurationarch/ | +5 | 1 reply | |
| 16/20 | x86, ptrace: add bts context unconditionallyarch/ arch/ include/ +3 more | +7 | 1 reply | |
| 17/20 | x86, ds: dont use TIF_DEBUGCTLMSRarch/ | +0 | 1 reply | |
| 18/20 | x86, ds: fix bad ds_reset_pebs()arch/ | +1 | 1 reply | |
| 19/20 | x86, ds: allow small debug store buffersarch/ arch/ | +10 | 1 reply | |
| 20/20 | x86, ds: support Core i7arch/ arch/ | +71 | 1 reply |
Reviews trailers per patch
3 of 20 patches have a Reviewed-by or Acked-by.
| Patch | Oleg Nesterov |
|---|---|
| 1/20 | R-b R-b |
| 2/20 | |
| 3/20 | R-b R-b |
| 4/20 | R-b R-b |
| 5/20 | |
| 6/20 | |
| 7/20 | |
| 8/20 | |
| 9/20 | |
| 10/20 | |
| 11/20 | |
| 12/20 | |
| 13/20 | |
| 14/20 | |
| 15/20 | |
| 16/20 | |
| 17/20 | |
| 18/20 | |
| 19/20 | |
| 20/20 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch 00/20] x86, ptrace, bts, hw-branch-tracer: fixes and cleanups
Signature · 58 lines
Patches 1-5 fix races with context switching 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 <[email protected]> --- 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.