This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: Notes from the systemtap BOF
- From: Mathieu Desnoyers <compudj at krystal dot dyndns dot org>
- To: Karim Yaghmour <karim at opersys dot com>
- Cc: "Spirakis, Charles" <charles dot spirakis at intel dot com>, systemtap at sources dot redhat dot com, Vara Prasad <prasadav at us dot ibm dot com>, bert hubert <bert dot hubert at netherlabs dot nl>
- Date: Tue, 26 Jul 2005 11:29:34 -0400
- Subject: Re: Notes from the systemtap BOF
- References: <2CB9B46A0690824693581340E23B4E1004A4AF6A@scsmsx401.amr.corp.intel.com> <42E64BD7.8020809@opersys.com>
A question about djprobes :
What would happen, on a SMP machine, if CPU A modifies the instructions (non
atomically) by inserting a jmp while another cpu, CPU B, has an EIP on its stack
which happens to be at the middle of the jmp address ? Would it cause an invalid
instruction exception when CPU B goes back fetching what it thinks is assembly
instructions while in fact it is a memory adress for the jmp ?
I think that the interrupt protection does not guarantee that no CPU has this
EIP address on their stack or in their current EIP : it only protects from CPU
which has not gone in this code path yet.
But maybe am I wrong ?
Mathieu
* Karim Yaghmour (karim@opersys.com) wrote:
>
> > 1) Jmps are multiple bytes, need to watch for branches to the middle of
> > the old code
> > 2) Insertion in "exception areas" like copy_from_user, when emulating
> > the instructions that could fault.
>
> There was one gentleman who was concerned regarding that all CPUs would
> pass through the kprob'ed point prior to replacing the original code.
> I think the question went something like: But what if not all CPUs go
> through that code path?
>
OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68