lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Jul 2015 16:24:07 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Andy Lutomirski <luto@...capital.net>,
	Brian Gerst <brgerst@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Andy Lutomirski <luto@...nel.org>,
	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Kees Cook <keescook@...omium.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/kconfig/32: Mark CONFIG_VM86 as BROKEN



On 10/07/2015 16:13, Ingo Molnar wrote:
> > This isn't hard, at least for Intel: make emulation_required() return true 
> > always (and fix the fallout).  However, it's not necessary.  The emulator is 
> > designed to be independent from the rest of KVM.  At some point I think Avi was 
> > testing it in userspace (or planning to do so). So you would just move it from 
> > arch/x86/kvm to arch/x86/emulate.
>
> Very nice!

Thanks. :)  Mostly on behalf of the former maintainers---and the Xen
folks too, the emulator has its roots there.

So, the starting point for hooking into the emulator is struct
x86_emulate_ops (in asm/kvm_emulate.h) and the function that calls into
it in KVM is x86_emulate_instruction.  You can look there to see how the
emulator can be used.  If it doesn't compile straight away in userspace,
I'll gladly accept patches.

There are parts of emulation that are actually done (for simplicity and
laziness) in x86_emulate_instruction rather than emulate.c, most notably
hardware debugging support, but these aren't really needed for an
initial prototype of vm86.

A lot of the stuff in x86_emulate_instruction isn't necessary for vm86
and can be WARN()ed away, because for example IN/OUT always cause a #GP
in vm86 mode.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ