X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Documentation%2Fkprobes.txt;h=0cfb00fd86ffd7834a395df7688879d42132fb0e;hb=a8a47197e97da833417e7dd185ce0b0fdff9cda9;hp=1762b81fcdf2ec4a235423687865453a16196aed;hpb=2f206fddfe16efd5722cfce24f8335bea3ff6692;p=firefly-linux-kernel-4.4.55.git diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 1762b81fcdf2..0cfb00fd86ff 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt @@ -542,9 +542,11 @@ Kprobes does not use mutexes or allocate memory except during registration and unregistration. Probe handlers are run with preemption disabled. Depending on the -architecture, handlers may also run with interrupts disabled. In any -case, your handler should not yield the CPU (e.g., by attempting to -acquire a semaphore). +architecture and optimization state, handlers may also run with +interrupts disabled (e.g., kretprobe handlers and optimized kprobe +handlers run without interrupt disabled on x86/x86-64). In any case, +your handler should not yield the CPU (e.g., by attempting to acquire +a semaphore). Since a return probe is implemented by replacing the return address with the trampoline's address, stack backtraces and calls @@ -596,7 +598,7 @@ a 5-byte jump instruction. So there are several limitations. a) The instructions in DCR must be relocatable. b) The instructions in DCR must not include a call instruction. c) JTPR must not be targeted by any jump or call instruction. -d) DCR must not straddle the border betweeen functions. +d) DCR must not straddle the border between functions. Anyway, these limitations are checked by the in-kernel instruction decoder, so you don't need to worry about that.