官术网_书友最值得收藏!

SYSRET

The fast system call interface provided by Intel and AMD was not without its issues. As stated previously, for fast system calls to work, the hardware, operating system, and applications must coordinate. This is to ensure that ABI information is handled properly, to allow the operating system to execute a system call without the need for the hardware to save the entire CPU state before execution begins.

The same applies when the system call is complete, and control must be handed back to the application. To accomplish this, the operating system must load the application's stack, and then execute the SYSRET instruction, which returns control to the application. 

The problem with this approach is that a non-maskable interrupt (NMI) could fire between the operating system loading the application's stack and the execution of SYSRET. The result of this race condition is that an NMI (which is code that executes with root privileges) would be executed using the application's stack and not the kernel's stack, resulting in a possible security vulnerability or corruption.

Thankfully, there are ways for modern operating systems to prevent this type of attack, which most operating systems, such as Linux, can and do leverage. 

主站蜘蛛池模板: 炎陵县| 建昌县| 珲春市| 涿州市| 炎陵县| 莲花县| 开化县| 土默特左旗| 南靖县| 中阳县| 神木县| 绩溪县| 扎兰屯市| 安泽县| 双桥区| 湖口县| 敦化市| 邛崃市| 醴陵市| 志丹县| 静乐县| 通江县| 怀安县| 咸丰县| 灵寿县| 应城市| 区。| 大石桥市| 新蔡县| 西城区| 南川市| 平江县| 贡觉县| 山西省| 长岭县| 平果县| 杂多县| 陵水| 武强县| 繁峙县| 唐海县|