This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Notes from the systemtap BOF


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 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]