On 06.07.2013, at 12:24, Peter Maydell wrote: > On 6 July 2013 01:36, Alexander Graf <ag...@suse.de> wrote: >> When we get a segmentation fault we check whether the fault was a write. If >> it was a write, it might be a fault because we tried to modify a code region. >> >> This logic does not work on ARM hosts, because they don't evaluate whether a >> segementation fault is due to a write. Instead they always declare it a read. >> >> So self modifying code fails with a segmentation fault whenever it tries to >> modify itself. >> >> Add the is_write evaluation based on what the kernel tells us as fault >> reason. >> >> Signed-off-by: Alexander Graf <ag...@suse.de> > > We've already got a patch for this on list : > http://patchwork.ozlabs.org/patch/248590/
Ah, seems like we wrote both patches at about the same time. I prefer yours though - it has a nice comment going with it :). Alex