qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] target/arm: Improve user-mode compatibility with JITs
@ 2023-06-11 11:44 John Högberg
  2023-06-11 11:53 ` [PATCH 1/2] target/arm: Handle IC IVAU to improve " John Högberg
  2023-06-11 11:54 ` [PATCH 2/2] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code John Högberg
  0 siblings, 2 replies; 5+ messages in thread
From: John Högberg @ 2023-06-11 11:44 UTC (permalink / raw)
  To: qemu-devel@nongnu.org; +Cc: peter.maydell@linaro.org

When running in user-mode QEMU currently fails to emulate JITs that
use dual-mapped code to get around W^X restrictions, where one mapping
is writable and one is executable. As it has no way of knowing that a
write to the writable region is reflected in the executable one, it
fails to invalidate previously translated code which leads to a crash
at best.

(Note that system mode is unaffected as the softmmu is fully aware of
what is going on.)

This patch series catches changes to dual-mapped code by honoring the
cache management instructions required to make things work on actual
hardware.

See https://gitlab.com/qemu-project/qemu/-/issues/1034 for more details

John Högberg (2):
  target/arm: Handle IC IVAU to improve compatibility with JITs
  tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

 target/arm/helper.c               |  47 ++++++-
 tests/tcg/aarch64/Makefile.target |   3 +-
 tests/tcg/aarch64/icivau.c        | 204 ++++++++++++++++++++++++++++++
 3 files changed, 250 insertions(+), 4 deletions(-)
 create mode 100644 tests/tcg/aarch64/icivau.c

-- 
2.34.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-11 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-11 11:44 [PATCH 0/2] target/arm: Improve user-mode compatibility with JITs John Högberg
2023-06-11 11:53 ` [PATCH 1/2] target/arm: Handle IC IVAU to improve " John Högberg
2023-06-11 16:47   ` Michael Tokarev
2023-06-11 17:31     ` John Högberg
2023-06-11 11:54 ` [PATCH 2/2] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code John Högberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).