{"id":110721,"date":"2023-10-10T15:10:19","date_gmt":"2023-10-10T13:10:19","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android"},"modified":"2023-10-10T15:10:19","modified_gmt":"2023-10-10T13:10:19","slug":"google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android","title":{"rendered":"Google has rewritten the pvmfm firmware used in Android in Rust.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>As part of efforts to strengthen the security of critical software components of the Android platform, Google has rewritten the pvmfm firmware used for organizing the operation of virtual machines launched by the pVM hypervisor from the Android Virtualization Framework in Rust. Previously, the firmware was written in C and implemented on top of the U-Boot bootloader, which had previously been found to contain vulnerabilities due to memory handling issues.     <\/p>\n<p>The rewritten Rust firmware is included in Android 14, and the universal libraries created during the firmware development process are packaged as crates and handed over to the Rust community. For instance, the smccc package has been published to support ARM interfaces like PSCI (Power State Coordination Interface) and SMCCC (SMC Calling Convention) calls, and the aarch64-paging package for manipulating memory page tables. Additionally, efforts have been made to fix bugs and expand the functionality of the existing virtio-drivers package with the implementation of VirtIO drivers. Beyond the Android platform, these packages are utilized in the Oak project, which develops components for secure data transmission, storage, and processing in Trusted Execution Environments (TEE).        <\/p>\n<p>The pVM hypervisor takes control at an early stage of booting and ensures complete memory isolation. <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/en\/vps\/\"   title=\"of virtual machines\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"2070\">of virtual machines<\/a> and host environments, preventing the host system from accessing the secure virtual machines handling confidential data. The pvmfm firmware (Protected Virtual Machine Firmware) takes control immediately after the virtual machine starts, verifies the formed environment, and decides whether to abort the boot process in case of integrity issues or generates a boot certificate for the guest system if the trust chain is confirmed.            <\/p>\n<p>Rewriting in Rust allows for simpler and safer compliance with the 'two rules' applied by Google to maintain the security of Android system components. According to this rule, any added code must meet no more than two out of three conditions: handling unverified input, using an unsafe programming language (C\/C++), and executing with elevated privileges. This rule implies that code for handling external data must either be trimmed to minimal privileges (isolated) or written in a safe programming language. According to Google, about 70% of all dangerous vulnerabilities identified in Android are caused by memory handling errors.     <\/p>\n<p>Rust focuses on safe memory management and reduces the risk of vulnerabilities caused by issues such as accessing memory after it has been freed and buffer overflows. Safe memory handling in Rust is ensured at compile time through reference checking, ownership tracking of objects, and accounting for the lifetimes (scope) of objects, as well as evaluating memory access correctness during code execution. Rust also provides tools for protection against integer overflows, requires mandatory initialization of variable values before use, better handles errors in the standard library, employs the concept of immutability for references and variables by default, and offers strong static typing to minimize logical errors.    <\/p>\n<p>Challenges that arise during the development of low-level components in Rust, such as drivers, include the necessity of working with raw pointers in unsafe mode, as Rust is designed with an emphasis on memory management allocated in the program. In code that operates without abstraction layers over the hardware, one must interact with shared memory and MMIO. Currently, Rust's capabilities for working with raw pointers leave much to be desired, but the situation is expected to improve after the stabilization of support for the macros offset_of, slice_ptr_get, and slice_ptr_len.       <\/p>\n<p>Among the drawbacks, it is also worth noting the need for improved syntax to access structure fields and array indices through raw pointers without creating references, as well as limitations in creating safe wrappers over unsafe operations that can lead to undefined behavior and cannot be checked by the compiler. For example, such wrappers cannot be created for operations with memory page tables, as page mapping in one part of the program can impact other parts.     <\/p>\n<p>Regarding the size of the resulting code, the old version of the pVM firmware occupied 220 kB, while the new one is 460 kB. However, the rewritten version includes new features that have allowed for the removal of some other components used during boot. As a result, the total size of all old and new boot components is comparable. It is noted that when size is more important than performance, comparable results to the C language can be achieved by enabling additional size optimization modes in the compiler, dropping unnecessary dependencies, and avoiding string formatting tools.    <\/p>\n<p>Additionally, the continuation of work on implementing the capability to run trusted applications (Trusted Applications) written in Rust within the Trusty operating system is mentioned. Trusty provides a Trusted Execution Environment (TEE) for Android, running in parallel with Android on the same processor in a separate isolated environment. Trusty is used in Pixel devices and already utilizes Rust in its libraries and system components (the kernel remains in C).<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=59900\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Android \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 pvmfm, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0445 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u043e\u043c pVM \u0438\u0437 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 Android Virtualization Framework. \u0420\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 U-Boot, \u0432 \u043a\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-110721","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Android \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 pvmfm, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Google \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 pvmfm, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0432 Android | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Android \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 pvmfm, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-10-10T13:10:19+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-10-10T13:10:19+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Google has rewritten the pvmfm firmware used in Android in Rust | ProHoster","description":"As part of efforts to enhance the security of critical software components in the Android platform, Google has rewritten the pvmfm firmware in Rust, which is used to organize the operation of virtual machines.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Google \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 pvmfm, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0432 Android | ProHoster","og:description":"\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Android \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 pvmfm, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/google-perepisal-na-yazyke-rust-proshivku-pvmfm-ispolzuemuyu-v-android","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2023-10-10T13:10:19+00:00","article:modified_time":"2023-10-10T13:10:19+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"110721","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2026-02-09 17:11:16","updated":"2026-02-09 17:11:16","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/110721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=110721"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/110721\/revisions"}],"predecessor-version":[{"id":159314,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/110721\/revisions\/159314"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=110721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=110721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=110721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}