> > Let me stress that if you are running on modified segment state, you
> > have no way to safely determine the virtual address on which you took an
> > instruction trap (int3, general protection, etc..). If you can't
> > determine the virtual address safely, you can't back out your code patch
> > to remove the breakpoint. At this point, you can't execute the next
>
> Kernel kprobes solves this by executing the code out of line. I don't know
> how they want to do that in user space though (need a safe address for that),
> but somehow that can be likely done.
In case of user space probes we adopt a similar method for executing the code
out-of-line. In user space probes we find free space in the current
process address space and copy the original instruction to that location and
execute that instruction from that location. User processes use stack space
to store local variables, agruments and return values. Normally the stack
space either below or above the stack pointer indicates the free stack space.
Also in case of no stack free space, we can expand the process stack, copy the
instruction and execute the instruction from that location.
Detials about this method is discussed on systemtap mailing lists. URL is below.
http://sourceware.org/ml/systemtap/2005-q3/msg00542.html
Please let me know if you have any other solution to the above problem.
Thanks
Prasanna
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: [email protected]
Ph: 91-80-25044636
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]