Advanced Search
    Li Bin, He Yeping, Ma Hengtai, Rui Jianwu. Recommending Interface Patches for Forward Porting of Linux Device Drivers Based on Existing Instances[J]. Journal of Computer Research and Development, 2021, 58(1): 189-207. DOI: 10.7544/issn1000-1239.2021.20200284
    Citation: Li Bin, He Yeping, Ma Hengtai, Rui Jianwu. Recommending Interface Patches for Forward Porting of Linux Device Drivers Based on Existing Instances[J]. Journal of Computer Research and Development, 2021, 58(1): 189-207. DOI: 10.7544/issn1000-1239.2021.20200284

    Recommending Interface Patches for Forward Porting of Linux Device Drivers Based on Existing Instances

    • The extent and scope of associated impact of Linux kernel version upgraded frequently on the drivers are very large. In order to repair the inconsistency error of the driver calling the kernel interface caused by this related impact, constantly modifying the old version drivers’ codes for forward porting is a continuing and urgent problem. There are existing researches on assistant understanding of driven evolution, assistant adaptation of driver porting middle lib and assistant information of driver porting. The efficiency of driver porting is improved by retrieving assistant information at the statement level. However, the existing methods only focus on retrieving assistant information itself without distinguishing the effective patch materials. Therefore, manual analysis and manual construction of adaptable patches are required. To overcome the above limitations, in this paper we propose a new method to recommend high quality patches for interface errors in drivers forward porting. We observe that: there are the same or similar kernel interfaces’ calls between multiple different drivers that rely on the same kernel interface services, and there may be existing instance codes in the development history of other drivers, which share the same interfaces reuse and interfaces changes after kernel version is upgraded. This paper uses the commonality of the error interface statements and similar existing instances in historical development information to analyze the characteristics of the error problem, and extracts targeted interface modification modes and contents of fine-grained materials to generate patches to be recommended. Specifically, the effective modification modes are determined by combining boundary point identification, similarity calculation, fine-grained difference comparison and frequency calculation. A classification algorithm based on the different characteristics of existing instances is proposed for the first time, by distinguishing the different types of modification contents, then content materials from two data sources are extracted respectively. Finally we use the editing script technology to generate the recommended patches using above materials. Experiment on 9 different types of real drivers shows that this method can recommend for 7 types of interface errors patches in driver porting, and the effective patches account for about 67.4%. Partly, it effectively supplements and expands existing assistant methods for driver porting.
    • loading

    Catalog

      Turn off MathJax
      Article Contents

      /

      DownLoad:  Full-Size Img  PowerPoint
      Return
      Return