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

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. 

主站蜘蛛池模板: 金乡县| 磴口县| 顺义区| 郑州市| 桓台县| 清新县| 江阴市| 丰城市| 尚志市| 玉龙| 个旧市| 兴国县| 泾源县| 武冈市| 天祝| 大邑县| 辽阳县| 高雄县| 东至县| 平乐县| 五大连池市| 那曲县| 郑州市| 黔西县| 武乡县| 武鸣县| 古浪县| 石嘴山市| 灵丘县| 建湖县| 永登县| 柏乡县| 绥德县| 阿克苏市| 克东县| 汾阳市| 丹棱县| 京山县| 霸州市| 玉环县| 九台市|