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] [day] [month] [year] [list]
Message-ID: <Zk0rXkXkchNnRxwQ@google.com>
Date: Tue, 21 May 2024 16:16:46 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Kai Huang <kai.huang@...el.com>
Cc: "pbonzini@...hat.com" <pbonzini@...hat.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] x86/reboot: Unconditionally define
 cpu_emergency_virt_cb typedef

On Wed, May 22, 2024, Kai Huang wrote:
> On 22/05/2024 8:02 am, Sean Christopherson wrote:
> > On Wed, May 15, 2024, Kai Huang wrote:
> > > How about we just make all emergency virtualization disable code
> > > unconditional but not guided by CONFIG_KVM_INTEL || CONFIG_KVM_AMD, i.e.,
> > > revert commit
> > > 
> > >     261cd5ed934e ("x86/reboot: Expose VMCS crash hooks if and only if
> > > KVM_{INTEL,AMD} is enabled")
> > > 
> > > It makes sense anyway from the perspective that it allows the out-of-tree
> > > kernel module hypervisor to use this mechanism w/o needing to have the
> > > kernel built with KVM enabled in Kconfig.  Otherwise, strictly speaking,
> > > IIUC, the kernel won't be able to support out-of-tree module hypervisor as
> > > there's no other way the module can intercept emergency reboot.
> > 
> > Practically speaking, no one is running an out-of-tree hypervisor without either
> > (a) KVM being enabled in the .config, or (b) non-trivial changes to the kernel.
> 
> Just for curiosity: why b) is required to support out-of-tree hypervisor
> when KVM is disabled in Kconfig?  I am probably missing something.

A variety of hooks that are likely needed for any x86 hypervisor (especially on
Intel) are guarded by CONFIG_KVM.  E.g. the posted interrupt vectors (though it's
definitely possible to use a different model than KVM), the entry point for
trampolining NMIs (though again, a hypervisor could just do "INT 2", at least
until FRED comes along), and probably a few other things.

I'm sure it's possible to workaround any issues, but I would be quite surprised
if out-of-tree code went through the effort of functioning with a kernel built
to play nice with KVM.  Who knows, maybe I'm entirely wrong :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ