This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
FW: Kprobes might be stealing int3
- From: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
- To: <systemtap at sources dot redhat dot com>
- Date: Thu, 23 Feb 2006 15:33:59 -0800
- Subject: FW: Kprobes might be stealing int3
I went little further and found why the application is segmentation
fault'ing.
In the kprobes_handler() code, we are checking
If (*addr != BREAK_INSTRUCTION) and this is where the
app is crashing since we are trying to dereference this address
which is not a linear address.
I would be happy to tryout any fix that any one provides.
Thanks,
Anil
-----Original Message-----
From: Keshavamurthy Anil S [mailto:anil.s.keshavamurthy@intel.com]
Sent: Thursday, February 23, 2006 12:11 PM
To: Systemtap
Cc: Keshavamurthy, Anil S
Subject: Kprobes might be stealing int3
Hi,
I tried running the below program on both
x86_64 and i386 and on both architecture,
if the kernel is compiled with CONFIG_KPROBES,
my below application segmentation faults.
On kernel where CONFIG_KPROBES set to N, the
same test program passes.
Here goes the test program...
-------------------------
#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");
}
----------------------------------