Automated Modularization of Kernel Components Based on Type Dependencies and Interface Semantics
摘要
With the development of software technology, the internal structure of programs is becoming more and more complex. Typically, programs lack effective internal isolation, making them vulnerable to attackers who exploit security flaws to compromise the entire system. Program modularization is a security mechanism to solve this problem. In this paper, we introduce an automated modularization technique for operating system kernels, leveraging type-based dependency analysis and kernel interface features. The proposed approach initially performs a dependency analysis based on data types to generate a dependency relationship network. Then, existing modular information within this network is extracted using community detection, employing GN-MQ as a metric for evaluating module quality and an improved Louvain algorithm to optimize the partitioning. The features of the operating system kernel interface are also extracted and analyzed for the operating system kernel interface, which is used as enlightening information to guide the modularization process and make the algorithm converge faster. We evaluated the effectiveness of the proposed approach using two distinct versions of the Linux kernel source code. The results demonstrate that several modules identified by our technique in the older kernel version have been subsequently refactored or removed in the newer version, confirming the practical relevance of our approach. The accuracy of the experimental results is further validated through comparative grouping using the MoJoFM algorithm.