Skip to contentSkip to conversation

kprobes: Update document about irq disabled state in kprobe handler

PATCH In review Masami Hiramatsu 2 participants 2 messages Aug 5, 2010 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kprobes: Update document about irq disabled state in kprobe handler

Update kprobes.txt about interrupts disabled state inside kprobes handlers, because optimized probe/boosted kretprobe run without disabling interrrupts on x86.

---

 Documentation/kprobes.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Documentation/kprobes.txt +5 -3
index 6653017..4189f01 100644
@@ -541,9 +541,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
Acked-by on v1 1/2
#1 lore raw
Quoted 6 lines · Masami Hiramatsu

Update kprobes.txt about interrupts disabled state inside kprobes handlers, because optimized probe/boosted kretprobe run without disabling interrrupts on x86.

Cc Ananth N Mavinakayanahalli <[email protected]>
Quoted 27 lines

---

 Documentation/kprobes.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Documentation/kprobes.txt +5 -3
index 6653017..4189f01 100644
@@ -541,9 +541,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