TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Jailed Just-in-Time Compilation on iOS

165 pointsby tbodtabout 5 years ago

2 comments

osyabout 5 years ago
&gt; While this approach works, continuously changing page permissions is often quite slow. A better solution for performance is to (ab)use memory mappings to map the same physical page twice, with two virtual addresses, one of which is accessible with write permissions and one which enables execute permissions.<p>Just finished implementing this for UTM :) <a href="https:&#x2F;&#x2F;github.com&#x2F;utmapp&#x2F;qemu&#x2F;commits&#x2F;ios-support" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;utmapp&#x2F;qemu&#x2F;commits&#x2F;ios-support</a><p>To Apple engineers reading this: please don’t patch this technique (unless you’re going to replace it with real JIT APIs). It’s not a security issue because get-task-allow entitlement is never granted in distribution certificates. And it’s allowing us devs to not have to jailbreak our phones and lose out on the security and privacy of the system.
评论 #22402832 未加载
评论 #22403124 未加载
kccqzyabout 5 years ago
This appears to be an expanded description of a long-known technique, described by the author on HN years ago: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18431524" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18431524</a><p>It&#x27;s also mentioned in the source code of UTM, a virtual machine app for iOS: <a href="https:&#x2F;&#x2F;github.com&#x2F;utmapp&#x2F;UTM&#x2F;blob&#x2F;ac89c106ecf9c765ea47bfe0428f504fce9cd9a6&#x2F;UTM&#x2F;main.m#L28" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;utmapp&#x2F;UTM&#x2F;blob&#x2F;ac89c106ecf9c765ea47bfe04...</a>
评论 #22401977 未加载