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]
Date:	Tue, 14 Aug 2012 12:32:21 -0300
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	Florian Westphal <fw@...len.de>
Cc:	kvm@...r.kernel.org, avi@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kvm: disable stealtime via reboot notifier to avoid mem
 corruption

On Tue, Aug 14, 2012 at 11:15:06AM +0200, Florian Westphal wrote:
> Marcelo Tosatti <mtosatti@...hat.com> wrote:
> > On Fri, Aug 10, 2012 at 12:36:22PM +0200, Florian Westphal wrote:
> > > --- a/arch/x86/kernel/kvmclock.c
> > > +++ b/arch/x86/kernel/kvmclock.c
> > > @@ -191,7 +191,6 @@ static void kvm_crash_shutdown(struct pt_regs *regs)
> > >  static void kvm_shutdown(void)
> > >  {
> > >  	native_write_msr(msr_kvm_system_time, 0, 0);
> > > -	kvm_disable_steal_time();
> > >  	native_machine_shutdown();
> > >  }
> > This part below will introduce a bug for shutdown. Can you retest with
> > the addition of kvm_disable_steal_time to kvm_pv_guest_cpu_reboot only,
> > retest and resend please?
> 
> I can, but the problem with kvm_disable_steal_time() in
> kvmclock.c is that with CONFIG_KVM_CLOCK=n the entire
> file won't be compiled.
> 
> And steal time doesn't depend on CONFIG_KVM_CLOCK=y.
> So if removing it there is a bug leaving it in only avoids
> that bug for CONFIG_KVM_CLOCK=y.

I meant to add kvm_disable_steal_time() call to arch/x86/kernel/kvm.c,
the first part of your patch, here:

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index c1d61ee..1596cc8 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -354,6 +354,7 @@ static void kvm_pv_guest_cpu_reboot(void *unused)
      if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
              wrmsrl(MSR_KVM_PV_EOI_EN, 0);
      kvm_pv_disable_apf();
+     kvm_disable_steal_time();
 }
 
 static int kvm_pv_reboot_notify(struct notifier_block *nb,

Can you test only that part and resend? 

The call to kvm_disable_steal_time() in kvmclock.c should not be
removed.

--
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