Skip to content

RFC TIF_KERNEL_TRACE thread flags

Mathieu Desnoyers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest21 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21LTTng Kernel Trace Thread Flag Alphaarch/alpha/include/asm/thread_info.h+3 -10 replies
2/21LTTng Kernel Trace Thread Flag ARMarch/arm/include/asm/thread_info.h+3 -01 reply
3/21LTTng Kernel Trace Thread Flag AVR32arch/avr32/include/asm/thread_info.h+3 -10 replies
4/21LTTng Kernel Trace Thread Flag Blackfinarch/blackfin/include/asm/thread_info.h+3 -10 replies
5/21LTTng Kernel Trace Thread Flag Crisarch/cris/include/asm/thread_info.h+7 -20 replies
6/21LTTng Kernel Trace Thread Flag Frvinclude/asm-frv/thread_info.h+3 -10 replies
7/21LTTng Kernel Trace Thread Flag H8300arch/h8300/include/asm/thread_info.h+3 -10 replies
8/21LTTng Kernel Trace Thread Flag ia64arch/ia64/include/asm/thread_info.h arch/ia64/kernel/entry.S+11 -50 replies
9/21LTTng Kernel Trace Thread Flag m32rinclude/asm-m32r/thread_info.h+7 -20 replies
10/21LTTng Kernel Trace Thread Flag m68karch/m68k/include/asm/thread_info_mm.h arch/m68k/include/asm/thread_info_no.h+4 -10 replies
11/21LTTng Kernel Trace Thread Flag MIPSarch/mips/include/asm/thread_info.h+3 -10 replies
12/21LTTng Kernel Trace Thread Flag pariscarch/parisc/include/asm/thread_info.h+2 -00 replies
13/21LTTng Kernel Trace Thread Flag powerpcarch/powerpc/include/asm/thread_info.h+5 -30 replies
14/21LTTng Kernel Trace Thread Flag s390arch/s390/include/asm/thread_info.h+2 -00 replies
15/21LTTng Kernel Trace Thread Flag SHarch/sh/include/asm/thread_info.h+7 -30 replies
16/21LTTng Kernel Trace Thread Flag sparcarch/sparc/include/asm/thread_info_32.h+2 -00 replies
17/21LTTng Kernel Trace Thread Flag sparc64arch/sparc/include/asm/thread_info_64.h+2 -10 replies
18/21LTTng Kernel Trace Thread Flag UMLarch/um/include/asm/thread_info.h+2 -00 replies
19/21LTTng Linux Kernel Trace Thread Flag x86arch/x86/include/asm/thread_info.h arch/x86/kernel/entry_32.S+8 -42 replies
20/21LTTng Kernel Trace Thread Flag xtensaarch/xtensa/include/asm/thread_info.h+3 -10 replies
21/21LTTng Kernel Trace Thread Flag APIinclude/linux/sched.h kernel/fork.c kernel/sched.c+67 -03 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC patch 00/21] TIF_KERNEL_TRACE thread flags

Hello,

This is the implementatino of TIF_KERNEL_TRACE thread flags I did in the LTTng tree. Basically, it offers :

- Setting a per-thread flag for _all_ threads to enable system-wide syscall tracing.
- No performance impact when disabled, no need to stop threads upon activation/deactivation (does not add latency to userspace threads upon activation).

The most tricky bits are in the x86_64 architecture, because its entry_64.S code does not expect the thread flags to be changed concurrently while the thread is running. I modified entry_64.S so that the architecture does not suffer of any performance impact when syscall audit or secure computing is enabled, but tests for the TIF_KERNEL_TRACE flag upon return to userspace too.

Given this looks very much like what Frederic is currently doing, I think it's good to post it for comments.

utrace tracehooks could potentially make this patchset obsolete, but I an not yet convinced that utrace offers the same low-latency guarantees as this code.

It applies on top of kernel 2.6.29-rc7.

Mathieu

Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68