From: Rusty Lynch 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 Signed-off-by: Andrew Morton --- arch/ia64/kernel/kprobes.c | 7 +++++++ 1 files changed, 7 insertions(+) diff -puN arch/ia64/kernel/kprobes.c~kprobes-ia64-refuse-inserting-kprobe-on-slot-1 arch/ia64/kernel/kprobes.c --- 25/arch/ia64/kernel/kprobes.c~kprobes-ia64-refuse-inserting-kprobe-on-slot-1 Fri Jun 24 16:39:33 2005 +++ 25-akpm/arch/ia64/kernel/kprobes.c Fri Jun 24 16:39:33 2005 @@ -270,6 +270,13 @@ static int valid_kprobe_addr(int templat 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; } _