diff options
author | Rusty Lynch <rusty.lynch@intel.com> | 2005-06-27 18:17:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 18:23:53 -0400 |
commit | a528e21c235862cc1ae50e7809eb9116dc40ea0c (patch) | |
tree | a755ae70dfe85d3f55c5b42df8c05dfb247f13c8 /arch/ia64/kernel | |
parent | 97f7943d70ff0e1e92ea627c44cfacfdae65dbc4 (diff) |
[PATCH] kprobes/ia64: refuse inserting kprobe on slot 1
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>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index c97e18e634ca..ec2ceade12b0 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -270,6 +270,13 @@ static int valid_kprobe_addr(int template, int slot, unsigned long addr) | |||
270 | addr); | 270 | addr); |
271 | return -EINVAL; | 271 | return -EINVAL; |
272 | } | 272 | } |
273 | |||
274 | if (slot == 1 && bundle_encoding[template][1] != L) { | ||
275 | printk(KERN_WARNING "Inserting kprobes on slot #1 " | ||
276 | "is not supported\n"); | ||
277 | return -EINVAL; | ||
278 | } | ||
279 | |||
273 | return 0; | 280 | return 0; |
274 | } | 281 | } |
275 | 282 | ||