kallsyms / warpspeed

macOS Record Replay Debugger
4 stars 0 forks source link

Look into finding a stable counter for determining when asynchronous events are delivered. #20

Open pmarkowsky opened 1 year ago

pmarkowsky commented 1 year ago

We need a stable counter / measurement to say when an asynchronous signal was delivered. Additionally the mechanism needs to allow us to inject an interrupt when the counter / measurement is hit for replay.

Potential Options

  1. Use a PMU counter like retired branches like they do in RR
  2. Use a homegrown stable timer and burn a thread like they do in the PacMan attack.

Option 1. May be easily exposed via kperf.


Resources

kallsyms commented 1 year ago

thought: is the 24(?)Mhz timer accessible from userland? we can't get interrupted by it but it should be more consistent than a while(1) thread