Year: 2023
Type: dissertation
Abstract: Hardware virtualization is widely used in cloud computing platforms. Multi-tenancy and oversubscribing hardware resources are leveraged in many types of public cloud computing to maximize their data center efficiency. Hypervisors play a crucial role in achieving these two features by multiplexing virtual machines on a single physical server. Despite continued hypervisor studies, commodity hypervisors still suffer from inefficiencies of virtual CPUs (vCPUs) and security concerns. The complexity and large code base of the commodity hypervisors make it challenging to uncover issues and apply the results of studies. In this dissertation, we revisit the design and implementation of commodity hypervisors to uncover issues of CPU virtualization and address the issues with modest modifications. Our investigation shows the following two issues. First, the vCPU scheduling with ad-hoc optimizations is insufficient to mitigate excessive vCPU spinning, which occurs when a vCPU is waiting in a spin loop for an event from a descheduled vCPU. Second, ignorance of contexts in instruction emulation leads to a large attack surface. To address excessive vCPU spinning, we identify three problems: 1) scheduler mismatch, 2) aggressive limitation of candidate vCPUs, and 3) inter-processor interrupt (IPI) context misuse. The first problem stems from the mismatch between the KVM vCPU scheduler and the Linux scheduler. The second and third problems come from failures in choosing candidate vCPUs to be scheduled next. Our in-depth analysis reveals simple modification to KVM (89 LoC) can mitigate excessive vCPU spinning. Our simple modification reduces excessive vCPU spinning by up to 96% and improves benchmark performance by up to 2.6×. Part of the proposed mitigation has been integrated with KVM from Linux KVM v5.13 onward. To address the large attack surface of the instruction emulator, we propose FWinst that is designed to identify illegitimate instructions and prevent them from being emulated based on emulation contexts. The key insight behind FWinst is that the instruction emulator needs to emulate only a small subset of instructions, depending on the underlying CPU micro-architecture and the hypervisor configuration. We have implemented a prototype of FWinst on KVM with modest modifications (279 LoC). Our experimental results demonstrate that FWinst defends against 14 real-world vulnerabilities in the KVM instruction emulator with negligible runtime overhead. The contribution of this dissertation is twofold. First, we show that virtual machines running on KVM still suffer from excessive vCPU spinning. We uncover the three problems that incur frequent excessive vCPU spinning and propose mitigations with modest modifications. This improves the performance of vCPUs in cloud computing. Second, we show that the instruction emulator in the commodity hypervisor has a large attack surface. We design and implement FWinst to eliminate the need to emulate many instructions on CPUs with full-fledged support for virtualization by considering emulation contexts. This improves the security of vCPUs in cloud computing.
Authors: イシグロ, ケンタ, Ishiguro, Kenta, 石黒, 健太
Institution: Keio University
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7139790690
