Re: [patch] kprobes: dont steal interrupts from vm86
From: Prasanna S Panchamukhi
Date: Tue Dec 07 2004 - 00:53:42 EST
Hi Stas,
> I've found yet another bug in this
> very same piece of code. Now I can
> reproduce the interrupt theft without
> using either vm86() or modify_ldt().
The patch below should fix this problem. Please
let me know if you any issues.
Regards
Prasanna
Stas repoted that kprobes steals int3 exceptions when not in
virtual-8086 mode. This patch fixes the problem by returning 0,
if the int3 exceptions does not belong to kprobes.
Signed-off-by: Prasanna S Panchamukhi <prasanna@xxxxxxxxxx>
---
linux-2.6.10-rc3-prasanna/arch/i386/kernel/kprobes.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -puN arch/i386/kernel/kprobes.c~kprobes-steals-int3 arch/i386/kernel/kprobes.c
--- linux-2.6.10-rc3/arch/i386/kernel/kprobes.c~kprobes-steals-int3 2004-12-07 11:20:33.000000000 +0530
+++ linux-2.6.10-rc3-prasanna/arch/i386/kernel/kprobes.c 2004-12-07 11:20:34.000000000 +0530
@@ -127,10 +127,10 @@ static inline int kprobe_handler(struct
* The breakpoint instruction was removed right
* after we hit it. Another cpu has removed
* either a probepoint or a debugger breakpoint
- * at this address. In either case, no further
- * handling of this interrupt is appropriate.
+ * at this address. In either case, kprobes
+ * need not handle it.
*/
- ret = 1;
+ ret = 0;
}
/* Not one of ours: let kernel handle it */
goto no_kprobe;
_
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/