Lines Matching refs:vm86

5  *  29 dec 2001 - Fixed oopses caused by unchecked access to the vm86
57 #include <asm/vm86.h>
87 #define VFLAGS (*(unsigned short *)&(current->thread.vm86->veflags))
88 #define VEFLAGS (current->thread.vm86->veflags)
100 struct vm86 *vm86 = current->thread.vm86;
109 BUG_ON(!vm86);
111 set_flags(regs->pt.flags, VEFLAGS, X86_EFLAGS_VIF | vm86->veflags_mask);
112 user = vm86->user_vm86;
114 if (!user_access_begin(user, vm86->vm86plus.is_vm86pus ?
145 tsk->thread.sp0 = vm86->saved_sp0;
149 vm86->saved_sp0 = 0;
152 memcpy(&regs->pt, &vm86->regs32, sizeof(struct pt_regs));
154 loadsegment(gs, vm86->regs32.gs);
162 pr_alert("could not access userspace vm86 info\n");
176 SYSCALL_DEFINE2(vm86, unsigned long, cmd, unsigned long, arg)
186 * NOTE: on old vm86 stuff this will return the error
202 struct vm86 *vm86 = tsk->thread.vm86;
211 * vm86 cannot virtualize the address space, so vm86 users
213 * that BIOS places important data in the first page, vm86
215 * for example, won't even bother trying to use vm86 if it
219 * disallow vm86(old) for users who cannot mmap at va 0.
224 * behavior for vm86 as well, as it ensures that legacy
228 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",
234 if (!vm86) {
235 if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL)))
237 tsk->thread.vm86 = vm86;
239 if (vm86->saved_sp0)
251 pr_info_once("vm86: '%s' uses VM86_SCREEN_BITMAP, which is no longer supported\n", get_task_comm(comm, current));
274 vm86->flags = v.flags;
275 vm86->cpu_type = v.cpu_type;
277 if (copy_from_user(&vm86->int_revectored,
281 if (copy_from_user(&vm86->int21_revectored,
286 if (copy_from_user(&vm86->vm86plus, &user_vm86->vm86plus,
289 vm86->vm86plus.is_vm86pus = 1;
291 memset(&vm86->vm86plus, 0,
294 memcpy(&vm86->regs32, regs, sizeof(struct pt_regs));
295 vm86->user_vm86 = user_vm86;
309 switch (vm86->cpu_type) {
311 vm86->veflags_mask = 0;
314 vm86->veflags_mask = X86_EFLAGS_NT | X86_EFLAGS_IOPL;
317 vm86->veflags_mask = X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL;
320 vm86->veflags_mask = X86_EFLAGS_ID | X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL;
327 vm86->saved_sp0 = tsk->thread.sp0;
328 savesegment(gs, vm86->regs32.gs);
380 set_flags(VEFLAGS, flags, current->thread.vm86->veflags_mask);
390 set_flags(VFLAGS, flags, current->thread.vm86->veflags_mask);
405 return flags | (VEFLAGS & current->thread.vm86->veflags_mask);
500 struct vm86 *vm86 = current->thread.vm86;
504 if (is_revectored(i, &vm86->int_revectored))
506 if (i == 0x21 && is_revectored(AH(regs), &vm86->int21_revectored))
530 struct vm86 *vm86 = current->thread.vm86;
532 if (vm86->vm86plus.is_vm86pus) {
555 struct vm86plus_info_struct *vmpi = &current->thread.vm86->vm86plus;
717 /* ---------------- vm86 special IRQ passing stuff ----------------- */