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

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. 

主站蜘蛛池模板: 郎溪县| 宁武县| 四川省| 柳河县| 楚雄市| 岑巩县| 威宁| 海阳市| 叙永县| 久治县| 游戏| 芜湖县| 休宁县| 阜康市| 昌平区| 安溪县| 三门县| 和政县| 惠东县| 华亭县| 石泉县| 乌鲁木齐县| 芦山县| 寿宁县| 滦平县| 呼玛县| 门源| 峨眉山市| 鄱阳县| 曲松县| 灵山县| 犍为县| 仁化县| 鄂托克旗| 游戏| 基隆市| 新民市| 壶关县| 凤阳县| 金山区| 舒城县|