Enable the JIT function of IOS WebKit under the jailbreak Device

Source: Internet
Author: User

In fact, a long time ago, a jailbreak worker studied how IOS's mobilesafari performs JIT processing.

Original PDF address: http://reverse.put.as/wp-content/uploads/2011/06/syscan11_breaking_ios_code_signing.pdf

The simple principle is as follows:

The essence of JIT is to dynamically generate and execute native code at runtime.

This operation is precisely forbidden by the app store because the App Store must audit a third party.ProgramThe native code to be uploaded. Therefore, the IOS system restricts the application through permission management.

The limitations can be simply understood as "dynamically generated nativecode can only be executed on a memory page ". For details, see the PDF above.

How to enable third-party application JIT on the jailbreak device:

As we all know, JIT lesafari has enabled JIT. You can use the ldid tool to view its code sign and find the following fields:

 
<Key> dynamic-codesigning </key> <true/>

This field is used to tell the system that the program has dynamicCode.

If we want to enable JIT for iOS chrome, we just need to refer to the http://blog.csdn.net/lucky_06/article/details/8925804 method to add the above entitlement field.

For a self-built program, you only need to add the above fields when the Code Sign entitlements is enabled.

Efficiency Comparison:

Test by sunspider, http://www.webkit.org/perf/sunspider/sunspider.html

The result on ipad2 is as follows: (representing the average completion time of each item, the smaller the better)

NoEnableJIT
: 7213 Ms

EnableJIT1803MS


The overall efficiency gap is three times that of apple.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.