Abstract
The Linux Security Module (LSM) framework is the cornerstone of modern Linux security, yet its performance has not been comprehensively evaluated in nearly two decades. This paper provides a long-overdue re-assessment of LSM overhead on modern kernels and hardware. By decoupling hook placement from policy enforcement logic, the authors demonstrate that while the core LSM infrastructure remains efficient, the increased complexity of the Linux kernel and the introduction of features like module stacking have significantly impacted performance. Notably, the overhead for file 'open' operations has risen from 27% to 87% in recent kernel versions.
Introduction
LSM supports mandatory access control (MAC) systems such as SELinux and AppArmor. Since the last major performance study, the Linux kernel has expanded from 3.7 million to over 18 million lines of code, and the number of authorization hooks has nearly doubled to 224. New features, including LSM stacking and integrity protection (IMA/EVM), have been integrated without a thorough analysis of their performance costs. This study aims to provide system practitioners with up-to-date data to balance security and performance requirements.
Methodology
The researchers developed a two-part evaluation framework to isolate overhead sources:
- LMBench-Hook: An extension of the LMBench suite testing 14 filesystem-related syscalls, accounting for directory depth.
- Tunable Security Module: A "dummy" LSM used to inject controlled latency into policy enforcement via busy-waiting.
Using multiple linear regression, the authors decoupled the cost of hook placement (invoking the security function) from policy enforcement (the logic within the module). Static analysis was also used to map hook triggers during file operations.
Performance Evaluation
Benchmarks were conducted on Linux kernel v5.3.0 using an Intel Core i7-6500U. The study compared a baseline kernel against configurations including Capabilities, SELinux, AppArmor, SMACK, TOMOYO, and Integrity Modules (IMA/EVM).
Key Insights
- The open() and stat() Bottleneck: These syscalls experience the heaviest impact. SELinux overhead for
open()has reached 87% in v5.3.0. - Logical Redundancy: Static analysis showed the kernel often repeats directory permission checks during path lookups, suggesting that caching results could improve performance.
- Stacking Sensitivity: LSM stacking follows a "white-list" approach where all modules must approve access. The order of modules significantly affects performance; stacking a module without internal caching (like TOMOYO) can increase overhead by up to 45x.
Key Results
The study found that while individual hook invocation costs are generally low (<15%), their cumulative effect in complex operations is substantial. SELinux exhibits the highest overhead for open and stat due to its reliance on inode-based hooks.
Integrity protection via IMA and EVM introduces severe overheads, exceeding 50% for many operations and reaching 135% for chmod. Furthermore, the relationship between policy enforcement latency and end-to-end syscall latency was found to be linear for most operations.
Conclusion and Future Work
The findings highlight a significant performance regression in modern LSM implementations, particularly for filesystem operations. While the study focused on the filesystem, future research is needed to evaluate overhead in networking and device drivers. Potential optimizations include reducing redundant directory checks in the Virtual File System (VFS) and developing more efficient caching for stacked LSM environments.
Summary updated