{"title":"用Rust开发Linux内核模块","authors":"Shao-Fu Chen, Yu-Sung Wu","doi":"10.1109/DSC54232.2022.9888822","DOIUrl":null,"url":null,"abstract":"The Linux system has become an indispensable component of today's Internet services, network backbones, and IoT devices. The Linux kernel is primarily implemented in the C language for efficiency, creating opportunities for memory bugs and synchronization bugs. We introduce the use of the Rust programming language in kernel development, where the safety features of the Rust language are leveraged to prevent the introduction of memory bugs or synchronization bugs when writing kernel code. We showcase the key steps in developing a Linux kernel module in Rust and discuss how the memory bugs and synchronization bugs are prevented. The evaluation demonstrates that the performance overhead of the Rust kernel modules is on par with the C kernel modules.","PeriodicalId":368903,"journal":{"name":"2022 IEEE Conference on Dependable and Secure Computing (DSC)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Linux Kernel Module Development with Rust\",\"authors\":\"Shao-Fu Chen, Yu-Sung Wu\",\"doi\":\"10.1109/DSC54232.2022.9888822\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The Linux system has become an indispensable component of today's Internet services, network backbones, and IoT devices. The Linux kernel is primarily implemented in the C language for efficiency, creating opportunities for memory bugs and synchronization bugs. We introduce the use of the Rust programming language in kernel development, where the safety features of the Rust language are leveraged to prevent the introduction of memory bugs or synchronization bugs when writing kernel code. We showcase the key steps in developing a Linux kernel module in Rust and discuss how the memory bugs and synchronization bugs are prevented. The evaluation demonstrates that the performance overhead of the Rust kernel modules is on par with the C kernel modules.\",\"PeriodicalId\":368903,\"journal\":{\"name\":\"2022 IEEE Conference on Dependable and Secure Computing (DSC)\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-06-22\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 IEEE Conference on Dependable and Secure Computing (DSC)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/DSC54232.2022.9888822\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE Conference on Dependable and Secure Computing (DSC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/DSC54232.2022.9888822","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
The Linux system has become an indispensable component of today's Internet services, network backbones, and IoT devices. The Linux kernel is primarily implemented in the C language for efficiency, creating opportunities for memory bugs and synchronization bugs. We introduce the use of the Rust programming language in kernel development, where the safety features of the Rust language are leveraged to prevent the introduction of memory bugs or synchronization bugs when writing kernel code. We showcase the key steps in developing a Linux kernel module in Rust and discuss how the memory bugs and synchronization bugs are prevented. The evaluation demonstrates that the performance overhead of the Rust kernel modules is on par with the C kernel modules.