Skip to content

Commit

Permalink
[PATCH] kprobes/ia64: refuse inserting kprobe on slot 1
Browse files Browse the repository at this point in the history
Without the ability to atomically write 16 bytes, we can not update the
middle slot of a bundle, slot 1, unless we stop the machine first.  This
patch will ensure the ability to robustly insert and remove a kprobe by
refusing to insert a kprobe on slot 1 until a mechanism is in place to
safely handle this case.

Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Rusty Lynch authored and Linus Torvalds committed Jun 27, 2005
1 parent 97f7943 commit a528e21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/ia64/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,13 @@ static int valid_kprobe_addr(int template, int slot, unsigned long addr)
addr);
return -EINVAL;
}

if (slot == 1 && bundle_encoding[template][1] != L) {
printk(KERN_WARNING "Inserting kprobes on slot #1 "
"is not supported\n");
return -EINVAL;
}

return 0;
}

Expand Down

0 comments on commit a528e21

Please sign in to comment.