Hi, On Mon, 18 Apr 2016, Andrew Haley wrote:
> >> That may not be safe. Consider an implementation which looks ahead > >> in the instruction stream and decodes the instructions speculatively. > > > > It should go without saying that patching instructions is followed by > > whatever means necessary to flush any such caches on a particular > > implementation (here after patching the jump, after patching the rest, > > and after patching the first insn again, i.e. three times). > > That doesn't necessarily help you, though, without an ISB in the reading > thread. I don't understand, which reading thread? We're writing, not reading instructions. You mean other executing threads? I will happily declare any implementation where it's impossible to safely patch the instruction stream by flushing the respective buffers or other means completely under control of the patching machinery, to be broken by design. What failure mode do you envision, exactly? Ciao, Michael.