4 ms·
Thankfully Apple can, in principle, statically analyze for this on the iOS App Store, as they do not allow JIT mappings on those devices.
by marcan_42 5y ago
Thankfully Apple can, in principle, statically analyze for this on the iOS App Store, as they do not allow JIT mappings on those devices.
- e_proxus 5y agoCan they guarantee no JIT code via static analysis as well? Or could someone sneak in a tiny bit of disguised JIT code just to get to this register? I would assume a huge JITed VM implementation would show up easily in analysis.
- tyingq 5y agoDo you need JIT though? Does Xcode support inline ASM, or various compilers extensions that can read/write a cpu register?
- marcan_42 5y agoIf you put this in your app directly, Apple can just find it and reject it at submission time. If JIT were an option, that wouldn't be enough, because the app could do it at runtime. Since it isn't, there is no way to "hide" something like this from the App Store static analyzer.
- tyingq 5y agoHrm. It seems like inline ASM allows for passing the register name dynamically, though I can't tell for sure. If that's the case, it seems like it would be hard to tell ahead of time, other than "app calls msr/mrs".
- saagarjha 5y agoInline assembly must resolve register names at compile time.