函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\vm86_32.c Create Date:2022-07-27 09:40:41
Last Modify:2022-05-22 10:11:03 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:save_v86_state

函数原型:void save_v86_state(struct kernel_vm86_regs *regs, int retval)

返回类型:void

参数:

类型参数名称
struct kernel_vm86_regs *regs
intretval
98  tsk等于当前进程
99  __useruser
100  vm86等于vm86
101  err等于0
108  开中断()
110  如果非vm86或非user_vm86
111  打印警报信息("no user_vm86: BAD\n")
112  do_exit(SIGSEGV)
114  set_flags(flags, VEFLAGS, X86_EFLAGS_VIF | veflags_mask)
115  user等于user_vm86
117  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(user, is_vm86pus ? sizeof(structvm86plus_struct) : sizeof(structvm86_struct))则
120  打印警报信息("could not access userspace vm86 info\n")
121  do_exit(SIGSEGV)
124  put_user_try
125  put_user_ex(bx, & ebx)
126  put_user_ex(cx, & ecx)
127  put_user_ex(dx, & edx)
128  put_user_ex(si, & esi)
129  put_user_ex(di, & edi)
130  put_user_ex(bp, & ebp)
131  put_user_ex(ax, & eax)
132  put_user_ex( Return frame for iretq , & eip)
133  put_user_ex(cs, & cs)
134  put_user_ex(flags, & eflags)
135  put_user_ex(sp, & esp)
136  put_user_ex(ss, & ss)
137  put_user_ex(hese are specific to v86 mode:, & hese are specific to v86 mode:)
138  put_user_ex(ds, & ds)
139  put_user_ex(fs, & fs)
140  put_user_ex(gs, & gs)
142  put_user_ex(screen_bitmap, & screen_bitmap)
143  put_user_catch(err)
144  如果err
145  打印警报信息("could not access userspace vm86 info\n")
146  do_exit(SIGSEGV)
149  禁止抢占()
150  sp0等于saved_sp0
151  sysenter_cs等于Segment selector values corresponding to the above entries:
152  This is used when switching tasks or entering/exiting vm86 mode.
153  refresh_sysenter_cs( & * New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct.)
154  saved_sp0等于0
155  禁用抢占和中断()
157  memcpy( & rmal regs, with special meaning for the segment descriptors.., & regs32, sizeof(structpt_regs))
159  lazy_load_gs(gs)
161  ax等于retval
调用者
名称描述
do_intThere 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]
handle_vm86_trap
handle_vm86_fault
handle_signal自定义信号处理函数