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

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. 

主站蜘蛛池模板: 岗巴县| 宣化县| 孝感市| 大埔县| 天峨县| 佛冈县| 桂阳县| 宝应县| 文山县| 黄浦区| 温宿县| 济宁市| 四子王旗| 荣昌县| 饶阳县| 通许县| 武定县| 万荣县| 永丰县| 中江县| 城固县| 武宁县| 陇川县| 江达县| 区。| 岳西县| 元阳县| 突泉县| 通道| 福贡县| 申扎县| 宜宾县| 罗江县| 漯河市| 文山县| 陆川县| 临高县| 龙州县| 清新县| 白城市| 固阳县|