diff options
author | Andi Kleen <ak@suse.de> | 2006-02-03 15:51:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-04 19:43:14 -0500 |
commit | 099f318b8d97490e58c595eb1b6d3415da5ccc03 (patch) | |
tree | 48a621571d97cf72b0ade93033ef6d68d2b676b8 /arch/x86_64/kernel/process.c | |
parent | 16acc0cd8f1aac63ddf5228c5bc29cf7d31627f4 (diff) |
[PATCH] x86_64: Don't allow kprobes on __switch_to
kprobes cannot deal with the funny calling conventions when it
runs on a different stack when it returns. If someone wants
to instrument context switch they can add a probe to schedule()
instead.
Cc: jkenisto@us.ibm.com, prasanna@in.ibm.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/process.c')
-rw-r--r-- | arch/x86_64/kernel/process.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 8ded407e4a94..22a05dec81a2 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -516,8 +516,10 @@ out: | |||
516 | * This could still be optimized: | 516 | * This could still be optimized: |
517 | * - fold all the options into a flag word and test it with a single test. | 517 | * - fold all the options into a flag word and test it with a single test. |
518 | * - could test fs/gs bitsliced | 518 | * - could test fs/gs bitsliced |
519 | * | ||
520 | * Kprobes not supported here. Set the probe on schedule instead. | ||
519 | */ | 521 | */ |
520 | struct task_struct * | 522 | __kprobes struct task_struct * |
521 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | 523 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) |
522 | { | 524 | { |
523 | struct thread_struct *prev = &prev_p->thread, | 525 | struct thread_struct *prev = &prev_p->thread, |