Skip to content
  • David Johnson's avatar
    Fix bugs in os_process_read and os_process_write. · b7cea9bb
    David Johnson authored
    We were effectively assuming virtual memory in os-process targets was
    contiguous... ouch.  Somebody (me) got a little too excited about just
    calling the base target!
    
    The fix for os_process_write is a little unfortunate, though.
    Basically, we assume that if we can resolve all the v2p mappings and
    read a byte from each page, that the page is present.  So we actually do
    all those checks before writing anything.  These checks of course are
    racy if the VM is not paused, but right now it's the best we can do.
    The only other solution would be to hack the hypervisor page protection
    bits, which would be super-heavyweight.  And we're not going to do that
    anytime soon!
    b7cea9bb