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]
Message-ID:
 <61f14bc6415d5d8407fc3ae6f6c3348caa2a97e9.camel@cyberus-technology.de>
Date: Thu, 18 Apr 2024 13:48:27 +0000
From: Thomas Prescher <thomas.prescher@...erus-technology.de>
To: "seanjc@...gle.com" <seanjc@...gle.com>
CC: "mingo@...hat.com" <mingo@...hat.com>, "x86@...nel.org" <x86@...nel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "hpa@...or.com"
	<hpa@...or.com>, Julian Stecklina <julian.stecklina@...erus-technology.de>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "bp@...en8.de" <bp@...en8.de>,
	"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/2] KVM: nVMX: fix CR4_READ_SHADOW when L0 updates CR4
 during a signal

On Wed, 2024-04-17 at 09:28 -0700, Sean Christopherson wrote:
> On Wed, Apr 17, 2024, Sean Christopherson wrote:
> > On Wed, Apr 17, 2024, Thomas Prescher wrote:
> > > On Tue, 2024-04-16 at 11:07 -0700, Sean Christopherson wrote:
> > > > Hur dur, I forgot that KVM provides a "guest_mode" stat. 
> > > > Userspace can do
> > > > KVM_GET_STATS_FD on the vCPU FD to get a file handle to the
> > > > binary stats,
> > > > and then you wouldn't need to call back into KVM just to query
> > > > guest_mode.
> > > > 
> > > > Ah, and I also forgot that we have kvm_run.flags, so adding
> > > > KVM_RUN_X86_GUEST_MODE would also be trivial (I almost
> > > > suggested it
> > > > earlier, but didn't want to add a new field to kvm_run without
> > > > a very good
> > > > reason).
> > > 
> > > Thanks for the pointers. This is really helpful.
> > > 
> > > I tried the "guest_mode" stat as you suggested and it solves the
> > > immediate issue we have with VirtualBox/KVM.
> > 
> > Note, 
> 
> Gah, got distracted.  I was going to say that we should add
> KVM_RUN_X86_GUEST_MODE,
> because stats aren't guaranteed ABI[*], i.e. relying on guest_mode
> could prove
> problematic in the long run (though that's unlikely).
> 
> [*]
> https://lore.kernel.org/all/CABgObfZ4kqaXLaOAOj4aGB5GAe9GxOmJmOP+7kdke6OqA35HzA@mail.gmail.com

Allright. I will propose a patch that sets the KVM_RUN_X86_GUEST_MODE
flag in the next couple of days. Do we also need a new capability for
this flag so userland can query whether this field is actually updated
by KVM?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ