Skip to content

x86, ptrace, bts, hw-branch-tracer: bug fixes and cleanups

Markus Metzger lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14x86, ptrace: add arch_ptrace_report_exitinclude/linux/ptrace.h include/linux/tracehook.h+18 -14 replies
2/14x86, mm: add release_locked_buffer_on_behalfinclude/linux/mm.h mm/mlock.c+13 -62 replies
3/14x86, ptrace, bts: stop bts tracing early in do_exitarch/x86/include/asm/ptrace.h arch/x86/kernel/ptrace.c+136 -208 replies
4/14x86, ds: wait before freeing the DS configurationarch/x86/kernel/ds.c+8 -02 replies
5/14x86, debugctlmsr: add _on_cpu variants for debugctlmsr functionsarch/x86/include/asm/processor.h+27 -00 replies
6/14x86, ds: add _noirq variants for ds_ functionsarch/x86/include/asm/ds.h arch/x86/kernel/ds.c arch/x86/kernel/ds_selftest.c +2 more+465 -2370 replies
7/14x86, ds: fix compile warning in ds selftestarch/x86/kernel/ds_selftest.c+1 -10 replies
8/14x86, ds: fix bounds check in ds selftestarch/x86/kernel/ds_selftest.c+6 -10 replies
9/14x86, ds: add ds selftests for _noirq variantsarch/x86/kernel/ds_selftest.c+137 -500 replies
10/14x86, ds: add ds selftests for task tracingarch/x86/kernel/ds_selftest.c+23 -00 replies
11/14x86, ptrace: remove ptrace_fork, use init_task insteadarch/x86/include/asm/ptrace.h arch/x86/kernel/ptrace.c include/linux/ptrace.h +2 more+22 -310 replies
12/14x86, ds: re-add exit warningarch/x86/include/asm/ds.h arch/x86/kernel/ds.c arch/x86/kernel/process.c +2 more+4 -80 replies
13/14x86, ds: use single configuration for all cpusarch/x86/kernel/ds.c+6 -30 replies
14/14x86, ds: support Core i7arch/x86/include/asm/ds.h arch/x86/kernel/ds.c+71 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/14] x86, ptrace, bts, hw-branch-tracer: bug fixes and cleanups

A bug in the ptrace bts extension may cause a kernel crash.

When the ptracer exits, it stops branch tracing for all ptraced tasks and frees the branch trace buffer. If the traced tasks are currently running, the branch trace buffer may be freed before the cpu running that task has stopped tracing, thus overwriting memory with branch trace data.

Patches 1-4 fix this problem by having the tracer wait for the tracee to become inactive. This ensures that the cpu has stopped tracing that task.

The bug affects the .29 kernel.

The rest of the patches are for tip/tracing/hw-branch-tracing only. Patches 5 and 6 fix boot problems caused by the hw-branch-tracer selftests reported by Ingo Molnar (thanks for reporting the problems). Patch 8 fixes a bug in the selftest.
Patches 9 and 10 add more selftests.
Patches 7, 11 - 13 are cleanup.
Patch 14 adds support for Core i7.
---------------------------------------------------------------------
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.