Re: [patch] kprobes: dont steal interrupts from vm86

From: Stas Sergeev
Date: Sat Dec 04 2004 - 13:10:35 EST


Hi Prasanna.

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().
Test-case is attached. It gets
ocasionally fixed by the patch I've
sent in my previous mail, but it is
really another bug that requires a
separate fix.
#include <stdlib.h>
#include <signal.h>

void my_trap(int sig)
{
printf("Test passed, all OK\n");
exit(0);
}

int main()
{
signal(SIGTRAP, my_trap);
asm volatile (".byte 0xcd,3");
printf("Stolen interrupt, very bad!\n");
}