On Tue, 13 Oct 2020 at 14:58, Paolo Bonzini <pbonz...@redhat.com> wrote: > > On 13/10/20 01:29, Joelle van Dyne wrote: > > From: osy <os...@users.noreply.github.com> > > > > https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon > > > > For < iOS 14, reverse engineered functions from libsystem_pthread.dylib is > > implemented to handle APRR supported SoCs. > > > > The following rules apply for JIT write protect: > > * JIT write-protect is enabled before tcg_qemu_tb_exec() > > * JIT write-protect is disabled after tcg_qemu_tb_exec() returns > > * JIT write-protect is disabled inside do_tb_phys_invalidate() but if it > > is called inside of tcg_qemu_tb_exec() then write-protect will be > > enabled again before returning. > > * JIT write-protect is disabled by cpu_loop_exit() for interrupt handling. > > * JIT write-protect is disabled everywhere else. > > > > Signed-off-by: Joelle van Dyne <j...@getutm.app> > > Can this be emulated somehow on other platforms (such as Linux) so that > it does not bitrot?
Some of it is write^execute, which we could test via OpenBSD I think if we updated our VM image not to mount the disk with that protection disabled. Having "generically support w^x" be separate from "iOS specifics" might be useful. The apple.com webpage linked above suggests also that we could test some at least of these APIs on our OSX builds if we enable the "hardened runtime" on x86 (though that might also enable other stuff we don't want to deal with? no idea) thanks -- PMM