Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\vm86_32.c Create Date:2022-07-28 08:41:42
Last Modify:2022-05-22 10:11:03 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:There are so many possible reasons for this function to return* VM86_INTx, so adding another doesn't bother me. We can expect* userspace programs to be able to handle it. (Getting a problem* in userspace is always better than an Oops anyway.) [KD]

Proto:static void do_int(struct kernel_vm86_regs *regs, int i, unsigned char __user *ssp, unsigned short sp)

Type:void

Parameter:

TypeParameterName
struct kernel_vm86_regs *regs
inti
unsigned char __user *ssp
unsigned shortsp
539  __user * intr_ptr
541  vm86 = vm86
543  If cs == BIOSSEG Then Go to cannot_handle
545  If is_revectored(i, & int_revectored) Then Go to cannot_handle
547  If i == 0x21 && is_revectored(AH(regs), & int21_revectored) Then Go to cannot_handle
549  intr_ptr * __user = i << 2
550  If Get a simple variable from user space(segoffs, intr_ptr) Then Go to cannot_handle
552  If segoffs >> 16 == BIOSSEG Then Go to cannot_handle
554  pushw(ssp, sp, get_vflags(regs), cannot_handle)
555  pushw(ssp, sp, cs, cannot_handle)
556  pushw(ssp, sp, IP(regs), cannot_handle)
557  cs = segoffs >> 16
558  SP(regs) -= 6
559  IP(regs) = segoffs & 0xffff
560  clear_TF(regs)
561  clear_IF(regs)
562  clear_AC(regs)
563  Return
565  cannot_handle :
566  save_v86_state(regs, 3/int x instruction (ARG = x) + (i << 8))
Caller
NameDescribe
handle_vm86_trap
handle_vm86_fault