aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorAndrei Warkentin <andrey.warkentin@gmail.com>2014-04-04 17:42:55 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-04-04 18:16:03 +0100
commitcd7ccc83512a0cba5aa0c778e7507f267cfb1b16 (patch)
tree6d59e0f162a7516be62b0178d147a7b0bebef403 /cpu-exec.c
parentd097696eba076da781967827e59f66a7857c8ecb (diff)
page_check_range: don't bail out early after unprotecting page
When checking a page range, if we found that a page was made read-only by QEMU because it contained translated code, we were incorrectly returning immediately after unprotecting that page, rather than continuing to check the entire range, so we might fail to unprotect pages later in the range, or might incorrectly return a "success" result even if later pages were not writable. In particular, this could cause segfaults in a case where signals are delivered back to back on a target architecture which uses trampoline code in the stack frame (as AArch64 currently does). The second signal causes a segfault because the frame cannot be written to (it was protected because we translated and executed the restorer trampoline, and the unprotect logic did not unprotect the whole range). Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com [PMM: expanded commit message a bit] Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpu-exec.c')
0 files changed, 0 insertions, 0 deletions