Avaliação do Overhead de Desempenho Introduzido pelo KPTI no Kernel Linux
Resumo
Este artigo avalia o overhead de desempenho introduzido pelo Kernel Page Table Isolation (KPTI), mitigação adotada pelo Linux para a vulnerabilidade Meltdown. Analisam-se os mecanismos de execução especulativa e de canal lateral baseado em cache que possibilitam o ataque, bem como o funcionamento do KPTI na separação dos espaços de endereçamento de usuário e kernel. Usando uma versão modificada do microbenchmark s1bench, mede-se a taxa de chamadas de sistema e o comportamento da TLB com KPTI ativado e desativado, em três conjuntos experimentais que variam a proporção entre trabalho em modo usuário e chamadas de sistema, além do Working Set Size (WSS). Os resultados mostram que o overhead do KPTI está diretamente associado à frequência de chamadas de sistema e à perda de reuso da TLB causada pelas trocas do registrador CR3, atingindo até 17% em cenários syscall-bound e se aproximando de zero quando o custo de acesso à memória ou o trabalho em modo usuário passa a dominar a execução.
Referências
Bowen, L. and Lupo, C. (2020). The performance cost of software-based security mitigations. In Anais do ACM/SPEC International Conference on Performance Engineering (ICPE ’20), pages 210–217, New York, NY, USA. Association for Computing Machinery.
Corbet, J. (2017). The current state of kernel page-table isolation. Publicado em: 20 dez. 2017. Acesso em: 27 abr. 2026.
Gregg, B. (2018). Kpti/kaiser meltdown initial performance regressions. Acesso em: 26 abr. 2026.
Gruss, D., Lipp, M., Schwarz, M., Fellner, R., Maurice, C., and Mangard, S. (2017). Kaslr is dead: Long live kaslr. In Anais do International Symposium on Engineering Secure Software and Systems, pages 161–176. Springer.
Hennessy, J. L. and Patterson, D. A. (2017). Computer Architecture: A Quantitative Approach. Morgan Kaufmann, Boston, 6 edition.
Huerta, Y. A. and Lilja, D. J. (2021). Revisiting the effects of the spectre and melt-down patches using the top-down microarchitectural method and purchasing power parity theory. BenchCouncil Transactions on Benchmarks, Standards and Evaluations, 1(1):100011.
Intel Corporation (2016). Intel 64 and IA-32 Architectures Optimization Reference Manual. Intel Corporation, Santa Clara, CA. Section: Intel Atom Microarchitecture (Silvermont/Goldmont).
Intel Corporation (2026). Intel 64 and IA-32 Architectures Software Developer’s Manual. Intel Corporation, Santa Clara, CA.
Irazoqui, G., Inci, M. S., Eisenbarth, T., and Sunar, B. (2016). Flush+flush: A fast and stealthy cache attack. In International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment, pages 279–299. Springer.
Lipp, M., Schwarz, M., Gruss, D., Prescher, T., Haas, W., Fogh, A., Horn, J., Mangard, S., Kocher, P., Genkin, D., Yarom, Y., and Hamburg, M. (2018). Meltdown: Reading kernel memory from user space. In Anais do 27th USENIX Security Symposium (USENIX Security ’18), pages 973–990. USENIX Association.
Liu, F., Yarom, Y., Ge, Q., Heiser, G., and Lee, R. B. (2015). Last-level cache side-channel attacks are practical. In 2015 IEEE Symposium on Security and Privacy (SP), pages 605–622. IEEE.
National Institute of Standards and Technology (2009). Side-channel attacks: Ten years after its publication and the impacts on cryptographic module security testing. Physical Security Testing Workshop. Acesso em: 27 abr. 2026.
Prout, A., Arcand, W., Bestor, D., Bergeron, B., Byun, C., Gadepally, V., Houle, M., Hubbell, M., Jones, M., Klein, A., Michaleas, P., Milechin, L., Mullen, J., Rosa, A., Samsi, S., Yee, C., Reuther, A., and Kepner, J. (2018). Measuring the impact of spectre and meltdown. In Anais do 2018 IEEE High Performance Extreme Computing Conference (HPEC), pages 1–5, Waltham, MA, USA. IEEE.
Yarom, Y. and Falkner, K. (2014). Flush+reload: A high resolution, low noise, l3 cache side-channel attack. In Anais do 23rd USENIX Security Symposium (USENIX Security ’14), pages 719–732. USENIX Association.
