Function report |
Source Code:arch\x86\kernel\vm86_32.c |
Create Date:2022-07-28 08:41:38 |
Last Modify:2022-05-22 10:11:03 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_sys_vm86
Proto:static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
Type:long
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm86plus_struct __user * | user_vm86 | |
bool | plus |
240 | tsk = current process |
243 | regs = current_pt_regs() |
244 | err = 0 |
246 | err = security_mmap_addr(0) |
247 | If err Then |
266 | pr_info_once("Denied a call to vm86(old) from %s[%d] (uid: %d). Set the vm.mmap_min_addr sysctl to 0 and/or adjust LSM mmap_min_addr policy to enable vm86 if you are using a vm86-based DOS emulator.\n", comm, task_pid_nr(current process), from_kuid_munged( & init_user_ns, current_uid())) |
269 | Return -EPERM |
272 | If Not vm86 Then |
289 | get_user_ex(cx, & ecx) |
290 | get_user_ex(dx, & edx) |
291 | get_user_ex(si, & esi) |
292 | get_user_ex(di, & edi) |
293 | get_user_ex(bp, & ebp) |
294 | get_user_ex(ax, & eax) |
295 | get_user_ex( Return frame for iretq , & eip) |
296 | get_user_ex(seg, & cs) |
298 | get_user_ex(flags, & eflags) |
299 | get_user_ex(sp, & esp) |
300 | get_user_ex(seg, & ss) |
303 | get_user_ex(ds, & ds) |
304 | get_user_ex(fs, & fs) |
305 | get_user_ex(gs, & gs) |
307 | get_user_ex(flags, & flags) |
308 | get_user_ex(screen_bitmap, & screen_bitmap) |
309 | get_user_ex(cpu_type, & cpu_type) |
310 | get_user_catch(err) |
314 | If copy_from_user( & int_revectored, & int_revectored, sizeof(structrevectored_struct)) Then Return -EFAULT |
318 | If copy_from_user( & int21_revectored, & int21_revectored, sizeof(structrevectored_struct)) Then Return -EFAULT |
322 | If plus Then |
323 | If copy_from_user( & vm86plus, & vm86plus, sizeof(structvm86plus_info_struct)) Then Return -EFAULT |
326 | for vm86 internal use = 1 |
327 | Else memset( & vm86plus, 0, sizeof(structvm86plus_info_struct)) |
342 | flags |= No VM86 support |
348 | veflags_mask = 0 |
349 | Break |
351 | veflags_mask = X86_EFLAGS_NT | X86_EFLAGS_IOPL |
352 | Break |
355 | Break |
356 | Default |
358 | Break |
365 | lazy_save_gs(gs) |
369 | sp0 += 16 |
371 | If boot_cpu_has(SYSENTER/SYSEXIT ) Then |
372 | sysenter_cs = 0 |
377 | preempt_enable() |
379 | If flags & lags masks Then mark_screen_rdonly(mm) |
382 | memcpy((structkernel_vm86_regs * )regs, & vm86regs, size of vm86regs ) |
384 | Return ax |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |