linux内核如何防止BIOS系统调用? [英] how does linux kernel prevents the BIOS system calls?

查看:198
本文介绍了linux内核如何防止BIOS系统调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

BIOS调用在Linux OS中不可用.我想知道内核如何阻止执行包含对BIOS子例程的调用的指令?

BIOS calls are not available in linux OS. I wonder how does a kernel prevents execution of such instructions that contains call to the BIOS subroutines?

推荐答案

INT n指令生成对由目标操作数指定的中断或异常处理程序的调用.目标操作数指定一个从0到255的中断向量号,编码为8位无符号中间值.每个中断向量号为IDT中的门描述符提供一个索引.

The INT n instruction generates a call to the interrupt or exception handler specified with the destination operand. The destination operand specifies an interrupt vector number from 0 to 255, encoded as an 8-bit unsigned intermediate value. Each interrupt vector number provides an index to a gate descriptor in the IDT.

所选中断描述符又包含指向中断或异常处理程序过程的指针.在保护模式下(Linux仅在保护模式下工作),IDT包含一个8字节描述符数组,每个描述符是一个中断门,陷阱门或任务门.

The selected interrupt descriptor in turn contains a pointer to an interrupt or exception handler procedure. In protected mode (linux works in protected mode only), the IDT contains an array of 8-byte descriptors, each of which is an interrupt gate, trap gate, or task gate.

此IDT由操作系统设置. Linux对其进行了设置,以使描述符指向其自身的处理程序,而不是指向BIOS处理程序.

This IDT is set by the OS. Linux sets it up so that descriptors point to its own handlers, not the BIOS handlers at all.

这篇关于linux内核如何防止BIOS系统调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆