Linus Torvalds, the legendary creator of Linux, hasonce again demonstrated his exceptional coding prowess by improving the multi-threaded performance of the Linux operating system with a mere 21-line code change. This recentcommit, aptly named x86/uaccess: Avoid using barriernospec() in 64-bit copyfrom_user(), is asecurity tweak designed to address the Meltdown and Spectre vulnerabilities discovered in 2018.

Meltdown and Spectre, serious security flaws affecting Intel, AMD, Apple, and ARM processors, exploit design flaws in chips, impacting nearlyall PC and smartphone users. The vulnerabilities, particularly prevalent in Intel and IBM POWER processors, pose a significant threat to information security due to their widespread use. These flaws allow unauthorized access to sensitive data stored in memory, raising concerns about their authenticityand severity.

While replacing processors is the ultimate solution, the only alternative to mitigate these vulnerabilities is patching operating systems. Linux, Android, OS X/macOS, and Windows have all implemented fixes, such as Linux’s kernel page table isolation technology. However, these software mitigations often lead to a substantial performancedecline.

Brendan Gregg, a Netflix engineer, described the KPTI (Kernel Page Table Isolation) mitigation for Meltdown as the biggest kernel performance regression I’ve ever seen, especially under high system call rates, context switching rates, page fault rates, and working set sizes. The KPTI patch can introducesignificant overhead, ranging from 1% to 800%.

For years, the community has been working to reduce the performance impact of Meltdown. Linus’s recent patch, a rewrite of a previous submission by Red Hat developer Josh Poimboeuf, aims to achieve the same security results without sacrificing performance.In his commit message, Torvalds stated, The kernel test bots report a 2.6% performance improvement in the perthreadops benchmark.

Essentially, Torvalds has found a way to achieve the same security outcome without compromising performance. This discovery holds significant implications for Linux systems requiring both high performance androbust security, such as web servers and cloud computing platforms.

This latest code change highlights Linus Torvalds’ exceptional ability to optimize code for maximum efficiency and security. His dedication to improving Linux continues to benefit millions of users worldwide, solidifying his position as a true pioneer in the world of open-source software.

References:


>>> Read more <<<

Views: 0

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注